[Numpy-discussion] numpy.ma.allclose bug

2008-11-20 Thread Charles سمير Doutriaux
The following shows a bug in numpy.ma.allclose: import numpy import numpy.ma a = numpy.arange(100) b=numpy.reshape(a,(10,10)) print b c=numpy.ma.masked_greater(b,98) print c.count() numpy.ma.allclose(b,1) numpy.ma.allclose(c,1) Since c is masked it fails I think it should pass returning either

Re: [Numpy-discussion] numpy.loadtxt requires seek()?

2008-11-20 Thread Ryan May
Stéfan van der Walt wrote: > 2008/11/20 Ryan May <[EMAIL PROTECTED]>: >> Does anyone know why numpy.loadtxt(), in checking the validity of a >> filehandle, checks for the seek() method, which appears to have no >> bearing on whether an object will work? > > I think this is simply a naive mistake o

Re: [Numpy-discussion] linalg.norm missing an 'axis' kwarg?!

2008-11-20 Thread Hans Meine
On Donnerstag 20 November 2008, Alan G Isaac wrote: > On 11/20/2008 5:11 AM Hans Meine apparently wrote: > > I have a 2D matrix comprising a sequence of vectors, and I want to > > compute the norm of each vector. np.linalg.norm seems to be the best > > bet, but it does not support axis. Wouldn't

Re: [Numpy-discussion] numpy.loadtxt requires seek()?

2008-11-20 Thread Stéfan van der Walt
2008/11/20 Ryan May <[EMAIL PROTECTED]>: > Does anyone know why numpy.loadtxt(), in checking the validity of a > filehandle, checks for the seek() method, which appears to have no > bearing on whether an object will work? I think this is simply a naive mistake on my part. I was looking for a way

[Numpy-discussion] numpy.loadtxt requires seek()?

2008-11-20 Thread Ryan May
Hi, Does anyone know why numpy.loadtxt(), in checking the validity of a filehandle, checks for the seek() method, which appears to have no bearing on whether an object will work? I'm trying to use loadtxt() directly with the file-like object returned by urllib2.urlopen(). If I change the check f

Re: [Numpy-discussion] can't build numpy 1.2.0 under python 2.6 (windows-amd64) using VS9

2008-11-20 Thread Hanni Ali
Hi All, I have reached the point where I really need to get some sort of optimised/accelerated BLAS/LAPACK for windows 64 so have been trying a few different things out to see whether I can get anything usable, today i stumbled across this: http://icl.cs.utk.edu/lapack-for-windows/index.html Has

Re: [Numpy-discussion] contiguous regions

2008-11-20 Thread Gregor Thalhammer
John Hunter schrieb: > I frequently want to break a 1D array into regions above and below > some threshold, identifying all such subslices where the contiguous > elements are above the threshold. I have two related implementations > below to illustrate what I am after. The first "crossings" is ra

[Numpy-discussion] contiguous regions

2008-11-20 Thread John Hunter
I frequently want to break a 1D array into regions above and below some threshold, identifying all such subslices where the contiguous elements are above the threshold. I have two related implementations below to illustrate what I am after. The first "crossings" is rather naive in that it doesn't

Re: [Numpy-discussion] unpickle

2008-11-20 Thread Frank Lagor
> > This, and your previous question, are mostly off-topic for > numpy-discussion. You may want to ask such questions in the future on > more general Python mailing lists. > > http://www.python.org/community/lists/ > > -- > Robert Kern > > Yes of course. Sorry for the spam. The numpy list is jus

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-20 Thread jh
On Thu, Nov 20, 2008 at 07:58:52AM +0200, Scott Sinclair wrote: > A Notes section giving an overview of the algorithm has been added to > the docstring http://docs.scipy.org/numpy/docs/numpy.linalg.linalg.solve/. Doc goals: We would like each function and class to have docs that compare favorably

[Numpy-discussion] Numpy 1.2.2 ?

2008-11-20 Thread Pierre GM
All, I've recently introduced some little fixes in the SVN version of numpy.ma.core Is there any plan for a 1.2.2 release, or will we directly switch to 1.3.0 ? Do I need to backport these fixes to 12x ? Thx a lot in advance P. ___ Numpy-discussion m

[Numpy-discussion] Priority rules between 0d array and np.scalar

2008-11-20 Thread Pierre GM
All, That time of a month again: could anybody (and I'm thinking about you in particular, Travis O.) can explain me what the priority rules are between a 0d ndarray and a np.scalar ? OK, I understand there are no real rules. However, the bug I was describing in a previous thread (www.mail-a

Re: [Numpy-discussion] linalg.norm missing an 'axis' kwarg?!

2008-11-20 Thread Alan G Isaac
On 11/20/2008 5:11 AM Hans Meine apparently wrote: > I have a 2D matrix comprising a sequence of vectors, and I want to compute > the > norm of each vector. np.linalg.norm seems to be the best bet, but it does > not > support axis. Wouldn't this be a nice feature? Of possible use until then:

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-20 Thread Alan G Isaac
On 11/20/2008 12:58 AM Scott Sinclair apparently wrote: > A Notes section giving an overview of the algorithm has been added to > the docstring http://docs.scipy.org/numpy/docs/numpy.linalg.linalg.solve/. You beat me to it. (I was awaiting editing privileges, which I just received.) Thanks! Alan

Re: [Numpy-discussion] Reduced row echelon form

2008-11-20 Thread Robert Young
Excellent, thank you all for your input. I don't actually have a specific problem that I need it for I just wanted to be able to work through some book examples. I'll take a look at Sage and Sympy. Thanks Rob On Wed, Nov 19, 2008 at 10:14 AM, Stéfan van der Walt <[EMAIL PROTECTED]>wrote: > Hi Ro

Re: [Numpy-discussion] linalg.norm missing an 'axis' kwarg?!

2008-11-20 Thread Hans Meine
On Thursday 20 November 2008 11:11:14 Hans Meine wrote: > I have a 2D matrix comprising a sequence of vectors, and I want to compute > the norm of each vector. np.linalg.norm seems to be the best bet, but it > does not support axis. Wouldn't this be a nice feature? Here's a basic implementation.

Re: [Numpy-discussion] ANN: numpy.i - added managed deallocation to ARGOUTVIEW_ARRAY1 (ARGOUTVIEWM_ARRAY1)

2008-11-20 Thread Egor Zindy
Christopher Barker wrote: > thanks! good stuff. > It would be great if you could put that in the numpy (scipy?) wiki > though, so more folks will find it. > > -Chris > Hello Chris, no problems, you are absolutely right, this is where the documents will have to eventually end up for maximum vi

[Numpy-discussion] linalg.norm missing an 'axis' kwarg?!

2008-11-20 Thread Hans Meine
Hi, I have a 2D matrix comprising a sequence of vectors, and I want to compute the norm of each vector. np.linalg.norm seems to be the best bet, but it does not support axis. Wouldn't this be a nice feature? Greetings, Hans ___ Numpy-discussion ma

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-20 Thread Charles R Harris
On Thu, Nov 20, 2008 at 2:29 AM, David Cournapeau <[EMAIL PROTECTED]>wrote: > On Thu, Nov 20, 2008 at 6:14 PM, Hoyt Koepke <[EMAIL PROTECTED]> wrote: > > > > > I believe the logs I attached (or rather linked to) don't involve > > atlas or lapack or any compiler flags. > > Ah, yes, sorry, I missed

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-20 Thread David Cournapeau
On Thu, Nov 20, 2008 at 6:14 PM, Hoyt Koepke <[EMAIL PROTECTED]> wrote: > > I believe the logs I attached (or rather linked to) don't involve > atlas or lapack or any compiler flags. Ah, yes, sorry, I missed the build.log one. The only thing which surprises me a bit is the size of long double (I

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-20 Thread Hoyt Koepke
Hi, > I honestly don't think those flags matter much in the case of > numpy/scipy. In particular, using SSE and co automatically is simply > impossible in numpy case, since the C code is very generic (non-aligned > - non contiguous items) and the compiler has no way to know at compile > time which

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-20 Thread David Cournapeau
On Thu, 2008-11-20 at 00:26 -0800, Hoyt Koepke wrote: > Hi, > > Sorry; my first message wasn't under 40 KB with the attachments, so > here's the same message but with the log files at > http://www.stat.washington.edu/~hoytak/logs.tar.bz2. > > > > Which ones ? > > Sorry; ATLAS = 3.9.4 and lapack

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-20 Thread Hoyt Koepke
Hi, Sorry; my first message wasn't under 40 KB with the attachments, so here's the same message but with the log files at http://www.stat.washington.edu/~hoytak/logs.tar.bz2. > Which ones ? Sorry; ATLAS = 3.9.4 and lapack=3.2. I'll give 3.8.2 a shot per your advice. > You should not do that,

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-20 Thread Gael Varoquaux
On Thu, Nov 20, 2008 at 07:58:52AM +0200, Scott Sinclair wrote: > A Notes section giving an overview of the algorithm has been added to > the docstring http://docs.scipy.org/numpy/docs/numpy.linalg.linalg.solve/. I thank you very much for doing this, and I reckon many users should be grateful. Thi