Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-22 Thread Dag Sverre Seljebotn
David Cournapeau wrote: Dag Sverre Seljebotn wrote: Questions: a) Should I submit a patch? b) Negative consequences? Perhaps another Python module can now not load a different BLAS implementation? (That still seems better than not being able to use MKL IMO). Besides the

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-22 Thread Matthieu Brucher
[1] BTW, I could not figure out how to link statically if I wanted -- is search_static_first = 1 supposed to work? Perhaps MKL will insist on loading some parts dynamically even then *shrug*. search_static_first is inherently fragile - using the linker to do this is much better (with

Re: [Numpy-discussion] Broadcasting and indexing

2010-01-22 Thread josef . pktd
On Thu, Jan 21, 2010 at 1:03 PM, Emmanuelle Gouillart emmanuelle.gouill...@normalesup.org wrote: Hi Thomas, broadcasting rules are only for ufuncs (and by extension, some numpy functions using ufuncs). Indexing obeys different rules and always starts by the first dimension. Just a

[Numpy-discussion] np.testing.assert_equal

2010-01-22 Thread Keith Goodman
Should np.testing.assert_equal(np.array(1), 1) raise an AssertionError? (It currently doesn't.) The use case I have in mind is that scipy.stats.nanamedian incorrectly returns np.array(1.0) for the median of a 1d array while np.median correctly returns 1.0. It would be handy if the assert

Re: [Numpy-discussion] np.testing.assert_equal

2010-01-22 Thread Charles R Harris
On Fri, Jan 22, 2010 at 10:11 AM, Keith Goodman kwgood...@gmail.com wrote: Should np.testing.assert_equal(np.array(1), 1) raise an AssertionError? (It currently doesn't.) The use case I have in mind is that scipy.stats.nanamedian incorrectly returns np.array(1.0) for the median of a 1d

[Numpy-discussion] void * abuse

2010-01-22 Thread Charles R Harris
Example: typedef void (PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *) The actual functions that implement this type don't match the prototype, an unfortunate fact that is papered over by casting said functions to the type to avoid warnings about initialization from

Re: [Numpy-discussion] generalized ufunc problem

2010-01-22 Thread David Warde-Farley
Hi Warren, Thanks for the reply. I actually have a very similar version in my own code; I was just hoping to figure out the generalized ufunc architecture. There aren't many examples of actual uses of this capability in NumPy, so I wanted to try and exercise it a bit. logsumexp is kind of