Re: [Numpy-discussion] Embedded NumPy LAPACK errors

2013-01-05 Thread Paul Anton Letnes
On 4. jan. 2013, at 21:42, m...@eml.cc wrote: Hiall, I am trying to embed numerical code in a mexFunction, as called by MATLAB, written as a Cython function. NumPy core functions and BLAS work fine, but calls to LAPACK function such as SVD seem to be made against to MATLAB's linked

[Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Matthew Brett
Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel tracked down on rank-0 arrays; it also makes reference to casting. The rank-0 arrays seem to have been one way of solving the problem of maintaining

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Matthew Brett
Hi, On Sat, Jan 5, 2013 at 12:15 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel tracked down on rank-0 arrays; it also makes reference to

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Matthew Brett
Hi, On Fri, Jan 4, 2013 at 4:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:01 PM, Andrew Collette andrew.colle...@gmail.com wrote: From a more basic perspective, I think that adding a number to an array should never raise an exception. I've not used any

Re: [Numpy-discussion] Embedded NumPy LAPACK errors

2013-01-05 Thread Robin
Coincidently I have been having the same problem this week. Unrelated to the problem, I would suggest looking at pymex which 'wraps' python inside Matlab very nicely, although it has the same problem with duplicate lapack symbols. https://github.com/kw/pymex I have the same problem with Enthough

[Numpy-discussion] Invalid value encoutered : how to prevent numpy.where to do this?

2013-01-05 Thread Eric Emsellem
Dear all, I have a code using lots of numpy.where to make some constrained calculations as in: data = arange(10) result = np.where(data == 0, 0., 1./data) # or data1 = arange(10) data2 = arange(10)+1.0 result = np.where(data1 data2, np.sqrt(data1-data2), np.sqrt(data2-data2)) which then

Re: [Numpy-discussion] Invalid value encoutered : how to prevent numpy.where to do this?

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 2:15 PM, Eric Emsellem eric.emsel...@eso.org wrote: Dear all, I have a code using lots of numpy.where to make some constrained calculations as in: data = arange(10) result = np.where(data == 0, 0., 1./data) # or data1 = arange(10) data2 = arange(10)+1.0 result =

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 12:32 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:01 PM, Andrew Collette andrew.colle...@gmail.com wrote: From a more basic perspective, I think that

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Ralf Gommers
On Sat, Jan 5, 2013 at 3:38 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jan 5, 2013 at 12:32 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:01 PM, Andrew Collette

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Matthew Brett
Hi, On Sat, Jan 5, 2013 at 2:38 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jan 5, 2013 at 12:32 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:01 PM, Andrew Collette

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Nathaniel Smith
On 5 Jan 2013 15:59, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Jan 5, 2013 at 2:38 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jan 5, 2013 at 12:32 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Fri, Jan 4, 2013 at 4:54 PM, Matthew Brett

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Matthew Brett
Hi, On Sat, Jan 5, 2013 at 4:16 PM, Nathaniel Smith n...@pobox.com wrote: On 5 Jan 2013 15:59, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Jan 5, 2013 at 2:38 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jan 5, 2013 at 12:32 PM, Matthew Brett matthew.br...@gmail.com

Re: [Numpy-discussion] Howto bisect old commits correctly

2013-01-05 Thread Frédéric Bastien
Hi, I had many error when tring to the checkedout version and recompile. the problem I had is that I didn't erased the build directory each time. This cause some problem as not all is recompiled correctly in that case. Just deleting this directory manually fixed my problem. HTH Fred On Fri,

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Nathaniel Smith
On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel tracked down on rank-0 arrays; it also makes reference to casting. The

Re: [Numpy-discussion] Invalid value encoutered : how to, prevent numpy.where to do this?

2013-01-05 Thread Eric Emsellem
Thanks! This makes sense of course. And yes the operation I am trying to do is rather complicated so I need to rely on a prior selection. Now I would need to optimise this for large arrays and the code does go through these command line many many times. When I have to operate on the two

Re: [Numpy-discussion] Invalid value encoutered : how to, prevent numpy.where to do this?

2013-01-05 Thread Eric Emsellem
Thanks! This makes sense of course. And yes the operation I am trying to do is rather complicated so I need to rely on a prior selection. Now I would need to optimise this for large arrays and the code does go through these command line many many times. When I have to operate on the two

Re: [Numpy-discussion] Invalid value encoutered : how to, prevent numpy.where to do this?

2013-01-05 Thread Eric Emsellem
Thanks! This makes sense of course. And yes the operation I am trying to do is rather complicated so I need to rely on a prior selection. Now I would need to optimise this for large arrays and the code does go through these command line many many times. When I have to operate on the two

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread David Cournapeau
On Sat, Jan 5, 2013 at 3:31 PM, Nathaniel Smith n...@pobox.com wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel tracked

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-05 Thread Nathaniel Smith
On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette andrew.colle...@gmail.com wrote: I agree the current behavior is confusing. Regardless of the details of what to do, I suppose my main objection is that, to me, it's really unexpected that adding a number to an array could result in an

Re: [Numpy-discussion] Invalid value encoutered : how to, prevent numpy.where to do this?

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 10:07 PM, Eric Emsellem eric.emsel...@eso.org wrote: Thanks! This makes sense of course. And yes the operation I am trying to do is rather complicated so I need to rely on a prior selection. Now I would need to optimise this for large arrays and the code does go

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 10:10 PM, David Cournapeau courn...@gmail.com wrote: Thanks for the entertaining explanation. Procrastination is a hell of a drug. I don't think 0-dim array being slow is such a big drawback. I would be really surprised if there was no way to make them faster, and

[Numpy-discussion] Which Python to use for Mac binaries

2013-01-05 Thread Ondřej Čertík
Hi, Currently the NumPy binaries are built using the pavement.py script, which uses the following Pythons: MPKG_PYTHON = { 2.5: [/Library/Frameworks/Python.framework/Versions/2.5/bin/python], 2.6: [/Library/Frameworks/Python.framework/Versions/2.6/bin/python], 2.7:

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Dag Sverre Seljebotn
On 01/05/2013 10:31 PM, Nathaniel Smith wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel tracked down on rank-0 arrays;