RE: Relatively prime integers in NumPy

2024-07-12 Thread AVI GROSS via Python-list
comes as tuples but as you are moving the result into numpy, does it matter: >>> list(itertools.product(a,b,c)) [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 0, 3), (0, 0, 4), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 1, 3), (0, 1, 4), (0, 2, 0), (0, 2, 1), (0, 2, 2), (0, 2, 3), (0, 2, 4), (0,

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
-list' ; oscar.j.benja...@gmail.com Subject: RE: Relatively prime integers in NumPy Dmitry, I clearly did not understand what you wanted earlier as you had not made clear that in your example, you already had progressed to some level where you had the data and were now doing a second s

RE: Relatively prime integers in NumPy

2024-07-12 Thread AVI GROSS via Python-list
ry Yu via Python-list' ; oscar.j.benja...@gmail.com; Popov, Dmitry Yu Subject: Re: Relatively prime integers in NumPy Thank you very much, Oscar. Using the following code looks like a much better solution than my current Python code indeed. np.gcd.reduce(np.transpose(a)) or np.gc

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
the following code. import numpy as np hkl_list=[] for h in range(0, max_h):   for k in range(0, max_k): for l in range(0, max_l):   hkl_local=[]   hkl_local.append(h)   hkl_local.append(k)   hkl_local.append(l

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
Thank you for your interest. My explanation is too concise indeed, sorry. So far, I have used Python code with three enclosed 'for' loops for this purpose which is pretty time consuming. I'm trying to develop a NumPy based code to make this procedure faster. This routine is kin

Re: Relatively prime integers in NumPy

2024-07-12 Thread Peter J. Holzer via Python-list
On 2024-07-08 19:09:45 +, Popov, Dmitry Yu via Python-list wrote: > Does NumPy provide a simple mechanism to identify relatively prime > integers, i.e. integers which don't have a common factor other than +1 > or -1? Typing "numpy gcd" into my favourite search en

RE: Relatively prime integers in NumPy

2024-07-11 Thread AVI GROSS via Python-list
faster vectorized operations. Numpy provides advantages like the above if you use it as intended. Of course there are other techniques in how code is refactored or the order of operations, or doing things in parallel. Just as an example, your inner loop ear the top is operating one at a

Re: Relatively prime integers in NumPy

2024-07-11 Thread Oscar Benjamin via Python-list
(posting on-list this time) On Thu, 11 Jul 2024 at 15:18, Popov, Dmitry Yu via Python-list wrote: > > Dear Sirs. > > Does NumPy provide a simple mechanism to identify relatively prime integers, > i.e. integers which don't have a common factor other than +1 or -1? For > e

RE: Relatively prime integers in NumPy

2024-07-11 Thread AVI GROSS via Python-list
Дмитрий, You may think you explained what you wanted but I do not see what result you expect from your examples. Your request is a bit too esoteric to be a great candidate for being built into a module like numpy for general purpose se but I can imagine it could be available in modules build on

Relatively prime integers in NumPy

2024-07-11 Thread Popov, Dmitry Yu via Python-list
Dear Sirs. Does NumPy provide a simple mechanism to identify relatively prime integers, i.e. integers which don't have a common factor other than +1 or -1? For example, in case of this array: [[1,5,8], [2,4,8], [3,3,9]] I can imagine a function which would return array of common fa

Re: Couldn't install numpy on Python 2.7

2024-06-13 Thread Ethan Furman via Python-list
Hey, everyone! I believe the original question has been answered, and tempers seem to be flaring in sub-threads, so let's call this thread done and move on to other interesting topics. Thank you for your support! -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Couldn't install numpy on Python 2.7

2024-06-13 Thread Chris Green via Python-list
Chris Angelico wrote: > On Thu, 13 Jun 2024 at 10:58, wrote: > > > > Chris, > > > > You seem to have perceived an insult that I remain unaware of. > > If you're not aware that you're saying this, then don't say it. > Er, um, that really makes no sense! :-) How can one not say something that on

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 10:58, wrote: > > Chris, > > You seem to have perceived an insult that I remain unaware of. If you're not aware that you're saying this, then don't say it. > I looked up FUD and sharply disagree with suggestions I am trying to somehow > cause Fear, Uncertainty or Doubt. I

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
Subject: Re: Couldn't install numpy on Python 2.7 On Thu, 13 Jun 2024 at 09:20, wrote: > My point was that version 4 COULD HAPPEN one day and I meant INCOMPATIBLE > version not 4. Obviously we can make a version 4 that is not incompatible > too. This is still FUD. Back your words

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 09:20, wrote: > My point was that version 4 COULD HAPPEN one day and I meant INCOMPATIBLE > version not 4. Obviously we can make a version 4 that is not incompatible > too. This is still FUD. Back your words with something, or stop trying to imply that there's another incom

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
tibility, or need to change, can happen anytime when you are importing things like numpy which is released whenever they want to and is not part of the python distribution. Also, as we have seen at times, other modules you may have imported, in some languages, can mask names you are using in your prog

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
a .tar.gz from PyPI and use pip > to install that. Although you'll have to track down the dependencies > yourself in that case. It is almost certainly better to download the wheel (.whl) file rather than the sdist (.tar.gz) file. Building NumPy from source needs not just compilers etc bu

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 08:46, Oscar Benjamin via Python-list wrote: > I don't know much about SSL and related networking things especially > on Windows. I would be surprised if pip on old Python can't install > from current PyPI though. I imagine that something strange has > happened like a new ve

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Greg Ewing via Python-list
On 13/06/24 4:31 am, avi.e.gr...@gmail.com wrote: It seems Microsoft is having a problem where something lik 2/3 of Windows users have not upgraded from Windows 10 after many years At least Python 3 is a clear improvement over Python 2 in many ways. Whereas the only thing Microsoft seems to hav

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
. I don't know whether that SSL > > warning is directly connected to pip not finding any versions of numpy > > but with the available information so far that seems like the first > > thing to consider. > > I think it is; AIUI, with an ancient SSL library, pip is unable to &g

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 07:57, Oscar Benjamin via Python-list wrote: > They are seeing a warning that explicitly says "You can upgrade to a > newer version of Python to solve this". I don't know whether that SSL > warning is directly connected to pip not finding any vers

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
ng a warning that explicitly says "You can upgrade to a newer version of Python to solve this". I don't know whether that SSL warning is directly connected to pip not finding any versions of numpy but with the available information so far that seems like the first thing to consider. It is

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 07:36, wrote: > But if the goal was to deprecate python 2 and in some sense phase it out, it > is perhaps not working well for some. Frankly, issuing so many updates like > 2.7 and including backporting of new features has helped make it possible to > delay any upgrade. The

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
solution could be to step backward to a version of python 2 that still has numpy support, or as was suggested, find out what other modules they are using are interfering with the program being satisfied with the last version of numpy being used and perhaps find a way to get ... In the long run, though

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Thu, 13 Jun 2024 at 06:55, Thomas Passin via Python-list wrote: > The project cannot move to a Python-3 compatible version because Jython > 3.xx doesn't exist and may never exist. The saving grace is that my > project doesn't have to use packages like numpy, scipy, and so

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Thomas Passin via Python-list
one. What decision? To not release any new versions of Python 2? That isn't actually the OP's problem here - the Python interpreter runs just fine. But there's no numpy build for the OP's hardware and Python 2.7. So if you want to complain about Python 2.7 being dead, all

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
ny new versions of Python 2? That isn't actually the OP's problem here - the Python interpreter runs just fine. But there's no numpy build for the OP's hardware and Python 2.7. So if you want to complain about Python 2.7 being dead, all you have to do is go through all of the p

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
lf Of MRAB via Python-list Sent: Wednesday, June 12, 2024 12:56 PM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 2024-06-12 17:31, AVI GROSS via Python-list wrote: > I am sure there is inertia to move from an older product and some people > need a reason

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread MRAB via Python-list
ars should ... Indeed... -Original Message- From: Python-list On Behalf Of Gordinator via Python-list Sent: Wednesday, June 12, 2024 10:19 AM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 12/06/2024 12:30, marc nicole wrote: I am trying to install n

RE: Couldn't install numpy on Python 2.7

2024-06-12 Thread AVI GROSS via Python-list
... -Original Message- From: Python-list On Behalf Of Gordinator via Python-list Sent: Wednesday, June 12, 2024 10:19 AM To: python-list@python.org Subject: Re: Couldn't install numpy on Python 2.7 On 12/06/2024 12:30, marc nicole wrote: > I am trying to install numpy library o

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Gordinator via Python-list
On 12/06/2024 12:30, marc nicole wrote: I am trying to install numpy library on Python 2.7.15 in PyCharm but the error message I get is: ERROR: Could not find a version that satisfies the requirement numpy (from versions: none) ERROR: No matching distribution found for numpy c:\python27\lib

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Chris Angelico via Python-list
On Wed, 12 Jun 2024 at 21:32, marc nicole via Python-list wrote: > > I am trying to install numpy library on Python 2.7.15 in PyCharm but the > error message I get is: > > You can upgrade to a newer version of Python to solve this. The answer is right there in the error m

Couldn't install numpy on Python 2.7

2024-06-12 Thread marc nicole via Python-list
I am trying to install numpy library on Python 2.7.15 in PyCharm but the error message I get is: ERROR: Could not find a version that satisfies the requirement numpy (from > versions: none) > ERROR: No matching distribution found for numpy > c:\python27\lib\site-packages\pip\_vendor\url

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin
On 3/28/2023 1:50 PM, a a wrote: On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote: On 3/28/2023 8:47 AM, a a wrote: Ok, I can export bookmarks to html file and open it in Firefox to get a long list of clickable urls but icon of the bookmarked web page is missing. When I open Bo

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote: > On 3/28/2023 8:47 AM, a a wrote: > > Ok, I can export bookmarks to html file and open it in Firefox to get > > a long list of clickable urls but icon of the bookmarked web page is > > missing. > > > > When I open Bookmarks as

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin
On 3/28/2023 8:47 AM, a a wrote: Ok, I can export bookmarks to html file and open it in Firefox to get a long list of clickable urls but icon of the bookmarked web page is missing. When I open Bookmarks as right a side-bar I can view and identify an individual Boomarks by icon, so I would like

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote: > On 3/27/2023 8:37 PM, a a wrote: > >> To save the tabs, right click any one of them and select the "Select All > >> Tabs" item. They will all highlight. Right click on one of them and > >> select the "Bookmark Tabs" item. A dial

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote: > On 3/27/2023 8:37 PM, a a wrote: > >> To save the tabs, right click any one of them and select the "Select All > >> Tabs" item. They will all highlight. Right click on one of them and > >> select the "Bookmark Tabs" item. A dial

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 8:37 PM, a a wrote: I can select All Opened Tabs (as from the given link) and get 1,000+ Opened Tabs ( I am afraid, this is s number of all saved bookmarks in the past) I go to menu, Bookmarks, Manage Boomarks and copy Tabs and https://www.textfixer.com/html/convert-url-to-html-lin

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 8:37 PM, a a wrote: To save the tabs, right click any one of them and select the "Select All Tabs" item. They will all highlight. Right click on one of them and select the "Bookmark Tabs" item. A dialog box will open with an entry lone for the Name to use (like "Tabset1") and a locat

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
On Tuesday, 28 March 2023 at 02:07:43 UTC+2, Thomas Passin wrote: > On 3/27/2023 4:02 PM, Thomas Passin wrote: > > On 3/27/2023 3:07 PM, a a wrote: > >> On Monday, 27 March 2023 at 19:19:41 UTC+2, Thomas Passin wrote: > >>> On 3/27/2023 10:07 AM, a a wrote: > Ok, I know, I need to switch to

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 4:02 PM, Thomas Passin wrote: On 3/27/2023 3:07 PM, a a wrote: On Monday, 27 March 2023 at 19:19:41 UTC+2, Thomas Passin wrote: On 3/27/2023 10:07 AM, a a wrote: Ok, I know, I need to switch to Windows 10 run on another PC next to me. I need to learn how to copy and move every w

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 3:07 PM, a a wrote: On Monday, 27 March 2023 at 19:19:41 UTC+2, Thomas Passin wrote: On 3/27/2023 10:07 AM, a a wrote: Ok, I know, I need to switch to Windows 10 run on another PC next to me. I need to learn how to copy and move every web page opened in Firefox as a reference to

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
On Monday, 27 March 2023 at 19:19:41 UTC+2, Thomas Passin wrote: > On 3/27/2023 10:07 AM, a a wrote: > > Ok, I know, I need to switch to Windows 10 run on another PC next to me. > > > > I need to learn how to copy and move every web page opened in Firefox as a > > reference to social media, web

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread Thomas Passin
On 3/27/2023 10:07 AM, a a wrote: Ok, I know, I need to switch to Windows 10 run on another PC next to me. I need to learn how to copy and move every web page opened in Firefox as a reference to social media, web sites for Python, chat and more (about 50 web pages live opened 😉 This sounds l

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-27 Thread a a
On Thursday, 23 March 2023 at 22:15:10 UTC+1, Thomas Passin wrote: > On 3/23/2023 3:38 PM, Mats Wichmann wrote: > > On 3/23/23 09:48, Thomas Passin wrote: > > > >> I didn't realize that Christoph Gohlke is still maintaining this site. > > > > Unless the the last-changed stuff stopped working,

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Thomas Passin
On 3/23/2023 3:38 PM, Mats Wichmann wrote: On 3/23/23 09:48, Thomas Passin wrote: I didn't realize that Christoph Gohlke is still maintaining this site. Unless the the last-changed stuff stopped working, it's in a static state: by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC I di

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Mats Wichmann
On 3/23/23 09:48, Thomas Passin wrote: I didn't realize that Christoph Gohlke is still maintaining this site. Unless the the last-changed stuff stopped working, it's in a static state: by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC -- https://mail.python.org/mailman/listinfo/pyt

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-23 Thread Thomas Passin
7;m sorry but I don't know how to find out except by trying internet searches - or by downgrading to earlier versions of Numpy hoping to find one that works and also can be used by the other libraries/programs that need to use it. Here's a possibility to try - https://www.lfd.uci.edu/

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-22 Thread Thomas Passin
machine, old OS, Windows 7, 32-bit system but I have visited every social chat support forum on the Internet: from Python to Matplotlib, Numpy, Twitter, Github. As a newbie I am not aware how to downgrade "the multiarray version to an earlier one I simply tried to test Python code from

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-22 Thread a a
module, or upgrade the computer/OS. > >>> > >>> It would be worth trying to downgrade the multiarray version to an > >>> earlier one and see if that fixes the problem. > >> Thank you Thomas > >> for your kind reply. > >> > &g

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
Internet: from Python to Matplotlib, Numpy, Twitter, Github. As a newbie I am not aware how to downgrade "the multiarray version to an earlier one I simply tried to test Python code from https://www.section.io/engineering-education/reading-and-processing-android-sensor-data-using-python-with-csv

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
machine, old OS, Windows 7, 32-bit system but I have visited every social chat support forum on the Internet: from Python to Matplotlib, Numpy, Twitter, Github. I mentioned the "multiarray" just because of its name in the error message: "Error module name: _multiarray_umath.cp38

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > On 3/16/2023 8:07 PM, a a wrote: > > Crash report: > > > > Problem Caption: > > Problem Event Name: APPCRASH > > Application name: python.exe > > Application version: 3.8.7150.1013 > > Application time signature: 5fe0df5a >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
your kind reply. I am fully aware to be living on an old machine, old OS, Windows 7, 32-bit system but I have visited every social chat support forum on the Internet: from Python to Matplotlib, Numpy, Twitter, Github. As a newbie I am not aware how to downgrade "the multiarray version to an

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
or upgrade the computer/OS. > > > > It would be worth trying to downgrade the multiarray version to an > > earlier one and see if that fixes the problem. > Thank you Thomas > for your kind reply. > > I am fully aware to be living on an old machine, old OS, Window

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-17 Thread Thomas Passin
On 3/16/2023 8:07 PM, a a wrote: Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application version: 3.8.7150.1013 Application time signature: 5fe0df5a Error module name: _multiarray_umath.cp38-win32.pyd Version of the module with t

Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-17 Thread a a
Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application version: 3.8.7150.1013 Application time signature: 5fe0df5a Error module name:_multiarray_umath.cp38-win32.pyd Version of the module with the error: 0.0.0.0 Time signature of

Re: Pandas or Numpy

2022-01-26 Thread Marco Sulla
quot;, and repeat for > other rows, is going to be slow. In my small way, I can confirm. In one of my previous works, we used numpy and Pandas. Writing the code in Pandas is quick, but they just realised that was really slow, and they tried to transform as much Panda code to numpy code as possibl

Re: Pandas or Numpy

2022-01-23 Thread Dennis Lee Bieber
ing use of either package, so my only basis for commenting is what I've read on web sites (like the pandas documentation site) > >It seems like both libraries are possible choices. Would one >be the obvious choice for me? > pandas USES numpy internally

Re: Pandas or Numpy

2022-01-23 Thread Avi Gross via Python-list
Definitely it sounds like you may use both. Quite a bit of what people do using DataFrame objects includes working on copies of individual columns, which often are numpy Series or the like and in the other direction, can be used to create or amend a pandas DataFrame. Plus, many operations used

Re: Pandas or Numpy

2022-01-23 Thread Julius Hamilton
Hey, I don’t know but in case you don’t get other good answers, I’m pretty sure Numpy is more of a mathematical library and Pandas is definitely for handling spreadsheet data. So maybe both. Julius On Sun 23. Jan 2022 at 18:28, Chris Angelico wrote: > On Mon, 24 Jan 2022 at 04:10, Tob

Re: Pandas or Numpy

2022-01-23 Thread Chris Angelico
ng else you've described should work fine (not sure how to redistribute on an exponential curve, but I'm sure it's not hard). BTW, Pandas is built on top of Numpy, so it's kinda "both". ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Pandas or Numpy

2022-01-23 Thread Tobiah
I know very little about either. I need to handle score input files for Csound. Each line is a list of floating point values where each column has a particular meaning to the program. I need to compose large (hundreds, thousands, maybe millions) lists and be able to do math on, or possibly sort

matrix row comparison and fetch data with numpy

2021-10-26 Thread variety jones
I have 2 matrix with , M and M' , The M' matrix is the result of calculation "order preserving" of the matrix M so i will explain more by examples , so here is the matrix M : M= np.array([ [15,4,-1,9,10,7], [-4,2,29,11,98,5], [101,24,3,19,77,53], [0,88,34,62

Re: installazione numpy

2021-10-12 Thread Peter Pearson
On Mon, 11 Oct 2021 07:56:27 +0200, stefano felli wrote: > l'installazione di numpy con > pip install numpy > fornisce errore > Building wheel for numpy (PEP 517) > > ERROR: Failed building wheel for numpy > Failed to build numpy > ERROR: Could not build wheels fo

installazione numpy

2021-10-11 Thread stefano felli
l'installazione di numpy con pip install numpy fornisce errore Building wheel for numpy (PEP 517) ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly A cosa è dovuto e come devo far

Re: NUmpy

2021-09-29 Thread Christian Gollwitzer
Am 29.09.21 um 18:16 schrieb Jorge Conforte: Hi, I have a netcdf file "uwnd_850_1981.nc" and I'm using the commands to read it: Your code is incomplete: from numpy import dtype  fileu ='uwnd_850_1981.nc' ncu = Dataset(fileu,'r') Where is "Data

NUmpy

2021-09-29 Thread Jorge Conforte
Hi, I have a netcdf file "uwnd_850_1981.nc" and I'm using the commands to read it: from numpy import dtype  fileu ='uwnd_850_1981.nc' ncu = Dataset(fileu,'r') uwnd=ncu.variables['uwnd'][:] and I had: :1: DeprecationWarning: `np.bool` is a

Re: NumPy: build script not finding correct python version [UPDATE]

2021-01-03 Thread Rich Shepard
On Sun, 3 Jan 2021, Rich Shepard wrote: I'm trying to rebuild numpy-1.18.2 using the newly installed Python-3.9.1. The script fails when running setup.py: Traceback (most recent call last): File "setup.py", line 32, in raise RuntimeError("Python version >= 3.5 r

NumPy: build script not finding correct python version

2021-01-03 Thread Rich Shepard
I'm trying to rebuild numpy-1.18.2 using the newly installed Python-3.9.1. The script fails when running setup.py: Traceback (most recent call last): File "setup.py", line 32, in raise RuntimeError("Python version >= 3.5 required.") RuntimeError: Python vers

Re: numpy/python (image) problem

2020-12-09 Thread Paulo da Silva
Às 05:55 de 09/12/20, Paulo da Silva escreveu: > Hi! > > I am looking at some code, that I found somewhere in the internet, to > compute DCT for each 8x8 block in an gray (2D) image (512x512). > > This is the code: > > def dct2(a): > return > scipy.fft.dct(scipy.fft.dct(a,axis=0,norm='ortho'

numpy/python (image) problem

2020-12-08 Thread Paulo da Silva
Hi! I am looking at some code, that I found somewhere in the internet, to compute DCT for each 8x8 block in an gray (2D) image (512x512). This is the code: def dct2(a): return scipy.fft.dct(scipy.fft.dct(a,axis=0,norm='ortho'),axis=1,norm='ortho') imsize=im.shape dct=np.zeros(imsize) # Do

Re: numpy problem (follow up)

2020-11-29 Thread Malcolm
Hi https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy also has a numpy wheel 1.19.4+vanilla‑cp39‑cp39‑win_amd64.whl "Vanilla is a minimal distribution, which does not include any optimized BLAS libray or C runtime DLLs." Have not tried this. cheers Malcolm On 30/11/2020 7:1

Re: numpy problem (follow up)

2020-11-29 Thread MRAB
On 2020-11-29 18:33, Dennis Lee Bieber wrote: On Sat, 28 Nov 2020 17:28:50 -0600, Larry Burford declaimed the following: when trying to run the tutorial program standardplot.py I get a msg that says my numpy won't pass a sanity check due to a problem in the Win runtime Wai

Re: numpy problem (follow up)

2020-11-28 Thread Malcolm
HI Just had the same problem. The solution that worked for me was ( pip uninstall numpy then pip install numpy==1.19.3 The latest update to windows has an error in the BLAS libray causing the error. its a known problem. hope this helps Malcolm On 29/11/2020 10:28 am, Larry Burford

numpy problem (follow up)

2020-11-28 Thread Larry Burford
I have completed reloading Still getting the error msg for numpy Gentlemen/Ladies, new to visual studio new-ish to python (I hope this is more to do with python ...) ~5 yr old HP with 16 GB,  1 TB,  W10 pro,  python 3.9.0,  VSCode 1.51.1,  3 monitor desktop when trying to run

RE: Why can't numpy array be restored to saved value?

2020-11-26 Thread pjfarley3
> -Original Message- > From: Christian Gollwitzer > Sent: Thursday, November 26, 2020 3:26 AM > To: python-list@python.org > Subject: Re: Why can't numpy array be restored to saved value? > > Am 25.11.20 um 07:47 schrieb pjfarl...@earthlink.net: > > Why is

RE: Why can't numpy array be restored to saved value?

2020-11-26 Thread pjfarley3
> -Original Message- > From: Greg Ewing > Sent: Thursday, November 26, 2020 12:01 AM > To: python-list@python.org > Subject: Re: Why can't numpy array be restored to saved value? > > On 25/11/20 7:47 pm, pjfarl...@earthlink.net wrote: > > Why isn'

Re: Why can't numpy array be restored to saved value?

2020-11-26 Thread Christian Gollwitzer
Am 25.11.20 um 07:47 schrieb pjfarl...@earthlink.net: Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value? I know I am missing something basic here. I thou

Re: Why can't numpy array be restored to saved value?

2020-11-25 Thread Greg Ewing
On 25/11/20 7:47 pm, pjfarl...@earthlink.net wrote: Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value? Slicing a numpy array doesn't copy anything, it just

Re: unable to use numpy

2020-11-25 Thread dn via Python-list
On 26/11/2020 06:53, ASHUTOSH SHARMA wrote: Good Evening Welcome to the *world wide* web, where it is also Thursday, and breakfast time (for late risers)!? I had installed numpy and updated to latest version also but getting runtime error pop while using. So please resolve this issue by

unable to use numpy

2020-11-25 Thread ASHUTOSH SHARMA
Good Evening I had installed numpy and updated to latest version also but getting runtime error pop while using. So please resolve this issue by giving a suitable solution of this. THANKS & REGARDS ASHUTOSH SHARMA Sent from Mail for Windows 10 -- https://mail.python.org/mailman/list

RE: Why can't numpy array be restored to saved value?

2020-11-25 Thread pjfarley3
Never mind, I found the numpy.copy function does what I need. Revised code below works. Sorry for wasting bandwidth. Peter --- nptest.py --- import numpy as np import sys if len(sys.argv) > 0: try: asz = int(sys.argv[1]) + 0 except: asz = 4 npary = np.full([asz,

Why can't numpy array be restored to saved value?

2020-11-24 Thread pjfarley3
Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value? I know I am missing something basic here. I thought I understood the concepts of immutable vs mutable value

Re: Need help in installing numpy

2020-11-11 Thread MRAB
, then the >>> prompt, and I can run simple programs without any problem. BUT, if I go back to the cmd prompt and type 'python --version', I simply get the cmd prompt again with no outputs whatsoever. I want to install the 'numpy' package. But when I type on the cmd

Need help in installing numpy

2020-11-11 Thread adelamsaleh--- via Python-list
rograms without any problem. BUT, if I go back to the cmd prompt and type 'python --version', I simply get the cmd prompt again with no outputs whatsoever. I want to install the 'numpy' package. But when I type on the cmd prompt 'pip install numpy', I get the response:pip :

numpy covariance (was Re: Truncation error)

2020-10-11 Thread Terry Reedy
f a 3rd party module are better asked on the discussion forum for that module. Such exist for numpy. 3. Your question is too vague to reliably answer. I am not sure what you mean by 'inbuilt syntax'. I presume that numpy cov calls 1 or more functions from the included LinPack code

Appending to and removing from numpy arrays

2020-06-10 Thread Urs Thuermann
Hi, is it possible to append data to or remove data from numpy arrays like Python lists? I have some code where I currently use lists and often do things like a.append(elem) a += b del a[:-n] I am thinking of changing to numpy arrays but it seems I cannot modify numpy arrays like

Re: python and numpy

2020-04-22 Thread edmondo . giovannozzi
Il giorno martedì 21 aprile 2020 21:04:17 UTC+2, Derek Vladescu ha scritto: > I’ve just begun a serious study of using Python as an aspiring > programmer/data scientist. > Can someone please walk me through how to download Python, SO THAT I will be > able to import numpy? > &g

Re: python and numpy

2020-04-21 Thread joseph pareti
ogrammer/data scientist. > > Can someone please walk me through how to download Python, SO THAT I will > > be able to import numpy? > > > > Thanks, > > Derek > > > > Sent from Mail for Windows 10 > > > > -- > > https://mail.python.

Re: python and numpy

2020-04-21 Thread Souvik Dutta
a serious study of using Python as an aspiring > programmer/data scientist. > Can someone please walk me through how to download Python, SO THAT I will > be able to import numpy? > > Thanks, > Derek > > Sent from Mail for Windows 10 > > -- > https://mail

python and numpy

2020-04-21 Thread Derek Vladescu via Python-list
I’ve just begun a serious study of using Python as an aspiring programmer/data scientist. Can someone please walk me through how to download Python, SO THAT I will be able to import numpy? Thanks, Derek Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: numpy array question

2020-04-02 Thread Peter Otten
jagmit sandhu wrote: > python newbie. I can't understand the following about numpy arrays: > > x = np.array([[0, 1],[2,3],[4,5],[6,7]]) > x > array([[0, 1], >[2, 3], >[4, 5], >[6, 7]]) > x.shape > (4, 2) > y = x[:,0] > y > arra

Re: numpy array question

2020-04-02 Thread edmondo . giovannozzi
Il giorno giovedì 2 aprile 2020 06:30:22 UTC+2, jagmit sandhu ha scritto: > python newbie. I can't understand the following about numpy arrays: > > x = np.array([[0, 1],[2,3],[4,5],[6,7]]) > x > array([[0, 1], >[2, 3], >[4, 5], >[6, 7]]) > x

numpy array question

2020-04-01 Thread jagmit sandhu
python newbie. I can't understand the following about numpy arrays: x = np.array([[0, 1],[2,3],[4,5],[6,7]]) x array([[0, 1], [2, 3], [4, 5], [6, 7]]) x.shape (4, 2) y = x[:,0] y array([0, 2, 4, 6]) y.shape (4,) Why is the shape for y reported as (4,) ? I expected it to

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Marco Sulla
On Thu, 19 Mar 2020 at 16:46, Peter J. Holzer wrote: > This is similar to algebraic expressions: Have you ever tried to read a > mathematical paper from before the time the current notation (which we > Long, convoluted > sentences instead of what can now be written as a short formula. ...yes, and

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread MRAB
On 2020-03-19 15:17, Musbur wrote: Hello, either it's me or everybody else who's missing the point. I understand the OP's proposal like this: dict[set] == {k: dict[k] for k in set} list[iterable] == [list[i] for i in iterable] Am I right? "Iterable" is too broad because it includes tuples an

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Rhodri James
On 19/03/2020 14:47, Peter J. Holzer wrote: On 2020-03-19 14:24:35 +, Rhodri James wrote: On 19/03/2020 13:00, Peter J. Holzer wrote: It's more compact, especially, if "d" isn't a one-character variable, but an expression: fname, lname = db[people].employee.object.get(pk=1234)[['firs

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Chris Angelico
On Fri, Mar 20, 2020 at 2:46 AM Peter J. Holzer wrote: > > A good language has a small core and extensibility via > > libraries. > > This would actually be a feature of the (standard) library. I think the line kinda blurs here. This would be a feature of a core data type, and in CPython, it would

  1   2   3   4   5   6   7   8   9   10   >