[Numpy-discussion] Wrong treatment of byte-order.

2011-08-30 Thread Nadav Horesh
Hi, This is my second post on this problem I found in numpy 1.6.1, and recently it cam up in the latest git version (2.0.0.dev-f3e70d9). The problem is numpy treats the native byte order ('<') as illegal while the wrong one ('>') as the right one. The output of the attached script (bult for p

Re: [Numpy-discussion] nan division warnings

2011-08-30 Thread mdekauwe
Perfect that works how I envisaged, I am an idiot, I clearly overcomplicated my solution. thanks. -- View this message in context: http://old.nabble.com/nan-division-warnings-tp32369310p32369517.html Sent from the Numpy-discussion mailing list archive at Nabble.com. ___

Re: [Numpy-discussion] converting standard array to record array

2011-08-30 Thread josef . pktd
On Tue, Aug 30, 2011 at 4:34 PM, Bryce Ready wrote: > Hello all, > > So i'm using numpy 1.6.0, and trying to convert a (4,4) numpy array of dtype > 'f8' into a record array of this dtype: > >> dt = np.dtype([('mat','(4,4)f8')]) > > Here is the code snippet: > >> In [21]: a = np.random.randn(4,4) >

Re: [Numpy-discussion] nan division warnings

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 22:39, mdekauwe wrote: > > Hi, > > this is probably my lack of understanding...when i set up some masks for 2 > arrays and try to divide one by the other I get a runtime warning. Seemingly > this is when I am asking python to divide one nan by the other, however I > thought

Re: [Numpy-discussion] Issue with dtype and nx1 arrays

2011-08-30 Thread Warren Weckesser
On Tue, Aug 30, 2011 at 10:34 PM, Thomas Robitaille < thomas.robitai...@gmail.com> wrote: > Hello, > > Is the following behavior normal? > > In [1]: import numpy as np > > In [2]: np.dtype([('a',' Out[2]: dtype([('a', ' > In [3]: np.dtype([('a',' Out[3]: dtype([('a', ' > I.e. in the second case, t

[Numpy-discussion] nan division warnings

2011-08-30 Thread mdekauwe
Hi, this is probably my lack of understanding...when i set up some masks for 2 arrays and try to divide one by the other I get a runtime warning. Seemingly this is when I am asking python to divide one nan by the other, however I thought by masking the array numpy would then know to ignore these

[Numpy-discussion] Issue with dtype and nx1 arrays

2011-08-30 Thread Thomas Robitaille
Hello, Is the following behavior normal? In [1]: import numpy as np In [2]: np.dtype([('a','http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
OK... so I have been using checksums to compare and it looks like I am getting a different value when it fails as opposed to when it passes... I.e. the input is NOT the same. When I save them to npy files and run LA.inv() I get consistent results. Now I have to track down in my code why the in

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 17:48, Mark Janikas wrote: > Hello All, > > Last week I posted a question involving the identification of linear > dependent columns of a matrix… but now I am finding an interesting result > based on the linalg.inv() function… sometime I am able to invert a matrix > that ha

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 18:34, Mark Janikas wrote: > When I export to ascii I am losing precision and it getting consistency... I > will try a flat dump.  More to come.  TY Might as well np.save() it to an .npy binary file and attach it. -- Robert Kern "I have come to believe that the whole w

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
When I export to ascii I am losing precision and it getting consistency... I will try a flat dump. More to come. TY MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Mark Janikas Sent: Tuesday, August 30, 2011 4:02

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
Working on it... Give me a few minutes to get you the data. TY! MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Christopher Jordan-Squire Sent: Tuesday, August 30, 2011 3:57 PM To: Discussion of Numerical Python Su

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Christopher Jordan-Squire
Can you give an example matrix? I'm not a numerical linear algebra expert, but I suspect that if your matrix is singular (or nearly so, in floating point) then any inverse given will look pretty wonky. Huge determinant, eigenvalues, operator norm, etc.. -Chris JS On Tue, Aug 30, 2011 at 5:48 PM,

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 17:48, Mark Janikas wrote: > Hello All, > > Last week I posted a question involving the identification of linear > dependent columns of a matrix… but now I am finding an interesting result > based on the linalg.inv() function… sometime I am able to invert a matrix > that ha

[Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
Hello All, Last week I posted a question involving the identification of linear dependent columns of a matrix... but now I am finding an interesting result based on the linalg.inv() function... sometime I am able to invert a matrix that has linear dependent columns and other times I get the Lin

[Numpy-discussion] converting standard array to record array

2011-08-30 Thread Bryce Ready
Hello all, So i'm using numpy 1.6.0, and trying to convert a (4,4) numpy array of dtype 'f8' into a record array of this dtype: dt = np.dtype([('mat','(4,4)f8')]) > Here is the code snippet: In [21]: a = np.random.randn(4,4) > > In [22]: a.view(dt) > and the resulting error: ValueError: new t

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
ok thanks a lot. Safe code is often better than over-smart code, so I would line up with Charles here. There is too much potential for ambiguity in expected behavior. Johann On 08/30/2011 09:06 PM, Robert Kern wrote: > On Tue, Aug 30, 2011 at 13:58, Johann Cohen-Tanugi > wrote: >> I am not sur

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 13:58, Johann Cohen-Tanugi wrote: > I am not sure I follow : is the problem the coerce-sequences-to-ndarrays > behavior, or is it the fact that it applies to division and not > multiplication? > I thought the second situation is the more problematic. > Anyway, you seem to t

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
I am not sure I follow : is the problem the coerce-sequences-to-ndarrays behavior, or is it the fact that it applies to division and not multiplication? I thought the second situation is the more problematic. Anyway, you seem to take it as a bug, should I file a ticket somewhere? thanks, johann

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 09:52, Charles R Harris wrote: > > On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi > wrote: >> >> I have numpy version 1.6.1 and I see the following behavior : >> >> In [380]: X >> Out[380]: 1.0476157527896641 >> >> In [381]: X.__class__ >> Out[381]: numpy.float64 >>

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 10:22, Charles R Harris wrote: > > > On Tue, Aug 30, 2011 at 11:02 AM, Richard D. Moores > wrote: >> >> On Tue, Aug 30, 2011 at 09:43, Charles R Harris >> wrote: >> >> > You might want to download ipython and matplotlib also so that you have >> > the >> > basic numpy stac

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 11:02 AM, Richard D. Moores wrote: > On Tue, Aug 30, 2011 at 09:43, Charles R Harris > wrote: > > > You might want to download ipython and matplotlib also so that you have > the > > basic numpy stack. > > Good idea. I got matplotlib, but ipython for Python 3x isn't on > ht

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 09:43, Charles R Harris wrote: > You might want to download ipython and matplotlib also so that you have the > basic numpy stack. Good idea. I got matplotlib, but ipython for Python 3x isn't on http://www.lfd.uci.edu/~gohlke/pythonlibs/ . Dick ___

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 10:27 AM, Richard D. Moores wrote: > On Tue, Aug 30, 2011 at 09:09, Charles R Harris > wrote: > > > > > > On Tue, Aug 30, 2011 at 10:01 AM, Richard D. Moores > > wrote: > >> > >> On Tue, Aug 30, 2011 at 08:51, Olivier Delalleau wrote: > >> > > >> > 2011/8/30 Richard D. M

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 09:09, Charles R Harris wrote: > > > On Tue, Aug 30, 2011 at 10:01 AM, Richard D. Moores > wrote: >> >> On Tue, Aug 30, 2011 at 08:51, Olivier Delalleau wrote: >> > >> > 2011/8/30 Richard D. Moores >> >> >> >> Is it possible to install 32-bit >> >> Python 3.2 on 64-bit W

Re: [Numpy-discussion] load from text files Pull Request Review

2011-08-30 Thread Chris.Barker
On 8/27/11 11:08 AM, Christopher Jordan-Squire wrote: > I've submitted a pull request for a new method for loading data from > text files into a record array/masked record array. > Click on the link for more info, but the general idea is to create a > regular expression for what entries should loo

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 10:01 AM, Richard D. Moores wrote: > On Tue, Aug 30, 2011 at 08:51, Olivier Delalleau wrote: > > > > 2011/8/30 Richard D. Moores > >> > >> Is it possible to install 32-bit > >> Python 3.2 on 64-bit Win 7 (you seem to have done so), so I could use > >> numpy? > >> > > > >

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 08:51, Olivier Delalleau wrote: > > 2011/8/30 Richard D. Moores >> >> Is it possible to install 32-bit >> Python 3.2 on 64-bit Win 7 (you seem to have done so), so I could use >> numpy? >> > > Yes you can insteall Python 32 bit on 64 bit Windows. Thanks. Would doing so le

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Olivier Delalleau
2011/8/30 Richard D. Moores > Is it possible to install 32-bit > Python 3.2 on 64-bit Win 7 (you seem to have done so), so I could use > numpy? > > Yes you can insteall Python 32 bit on 64 bit Windows. -=- Olivier ___ NumPy-Discussion mailing list NumP

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 07:19, Bruce Southey wrote: > On Tue, Aug 30, 2011 at 8:56 AM, Richard D. Moores wrote: >> On Tue, Aug 30, 2011 at 06:53, Charles R Harris >> wrote: >>> >>> >>> On Tue, Aug 30, 2011 at 7:47 AM, Richard D. Moores >>> wrote: Python 3.2, 64-bit Win 7 Whe

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Olivier Delalleau
2011/8/30 Charles R Harris > > > On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi < > johann.cohentan...@gmail.com> wrote: > >> I have numpy version 1.6.1 and I see the following behavior : >> >> In [380]: X >> Out[380]: 1.0476157527896641 >> >> In [381]: X.__class__ >> Out[381]: numpy.float6

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi < johann.cohentan...@gmail.com> wrote: > I have numpy version 1.6.1 and I see the following behavior : > > In [380]: X > Out[380]: 1.0476157527896641 > > In [381]: X.__class__ > Out[381]: numpy.float64 > > In [382]: (2,3)*X > Out[382]: (2, 3) >

[Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
I have numpy version 1.6.1 and I see the following behavior : In [380]: X Out[380]: 1.0476157527896641 In [381]: X.__class__ Out[381]: numpy.float64 In [382]: (2,3)*X Out[382]: (2, 3) In [383]: (2,3)/X Out[383]: array([ 1.90909691, 2.86364537]) In [384]: X=float(X) In [385]: (2,3)/X

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Bruce Southey
On Tue, Aug 30, 2011 at 8:56 AM, Richard D. Moores wrote: > On Tue, Aug 30, 2011 at 06:53, Charles R Harris > wrote: >> >> >> On Tue, Aug 30, 2011 at 7:47 AM, Richard D. Moores >> wrote: >>> >>> Python 3.2, 64-bit Win 7 >>> >>> When I try to install numpy-1.6.1.win32-py3.2.exe (md5) I get "Pytho

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
On Tue, Aug 30, 2011 at 06:53, Charles R Harris wrote: > > > On Tue, Aug 30, 2011 at 7:47 AM, Richard D. Moores > wrote: >> >> Python 3.2, 64-bit Win 7 >> >> When I try to install numpy-1.6.1.win32-py3.2.exe (md5) I get "Python >> version 3.2 required, which was not found in the registry". What t

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 7:47 AM, Richard D. Moores wrote: > Python 3.2, 64-bit Win 7 > > When I try to install numpy-1.6.1.win32-py3.2.exe (md5) I get "Python > version 3.2 required, which was not found in the registry". What to > do? > > Did you already install python from python.org

Re: [Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Olivier Delalleau
win32 = 32 bit Python. That's probably the issue. -=- Olivier 2011/8/30 Richard D. Moores > Python 3.2, 64-bit Win 7 > > When I try to install numpy-1.6.1.win32-py3.2.exe (md5) I get "Python > version 3.2 required, which was not found in the registry". What to > do? > > Thanks, > > Dick Moores

[Numpy-discussion] numpy-1.6.1.win32-py3.2.exe (md5) won't install

2011-08-30 Thread Richard D. Moores
Python 3.2, 64-bit Win 7 When I try to install numpy-1.6.1.win32-py3.2.exe (md5) I get "Python version 3.2 required, which was not found in the registry". What to do? Thanks, Dick Moores ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] wierd numpy.void behavior

2011-08-30 Thread Olivier Delalleau
It looks like numpy.void does not properly implement __hash__: In [35]: arr[0]['quantize'] == arr[1]['quantize'] Out[35]: True In [34]: hash(arr[0]['quantize']) == hash(arr[1]['quantize']) Out[34]: False I'm not familiar enough with this kind of data type to tell you if you are using it as it sh

[Numpy-discussion] wierd numpy.void behavior

2011-08-30 Thread Neal Becker
I've encountered something weird about numpy.void. arr = np.empty ((len(results),), dtype=[('deltaf', float), ('quantize', [('int', int), ('frac', int)])]) for i,r in enumerate (results): arr[i] = (r[0]['deltaf'], tuple(r[0]['quantize_mf'

[Numpy-discussion] Want to find a scientific app using NumPy to process large set of data, say more than 1000000 elements in ndarray.

2011-08-30 Thread Qisheng Yang
Hello, All As the subject say, I want to exercise *multiprocessing *module in NumPy in order to take advantage of multi-cores. A project which processing large set of data will be useful to compare single thread with multi-thread. I have reviewed some projects using NumPy/SciPy list on SciPy home

Re: [Numpy-discussion] A question about dtype syntax

2011-08-30 Thread Pierre GM
On Aug 30, 2011, at 10:46 AM, Marquette Jean-Baptiste wrote: > Hi all, > > I have this piece of code: > > Stats = [CatBase, round(stats.mean(Data.Ra), 5), round(stats.mean(Data.Dec), > 5), len(Sep), round(stats.mean(Sep),4), round(stats.stdev(Sep),4)] > print Stats > if First: > StatsAll

[Numpy-discussion] A question about dtype syntax

2011-08-30 Thread Marquette Jean-Baptiste
Hi all, I have this piece of code: Stats = [CatBase, round(stats.mean(Data.Ra), 5), round(stats.mean(Data.Dec), 5), len(Sep), round(stats.mean(Sep),4), round(stats.stdev(Sep),4)] print Stats if First: StatsAll = np.array(np.asarray(Stats), dtype=('a11, f8, f8, i4, f8, f8')) Firs