[Numpy-discussion] Calling scipy blas from cython is extremely slow

2013-02-23 Thread Sergio Callegari
Hi, following the excellent advice of V. Armando Sole, I have finally succeeded in calling the blas routines shipped with scipy from cython. I am doing this to avoid shipping an extra blas library for some project of mine that uses scipy but has some things coded in cython for extra speed. So

[Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Till Stensitzki
Hello, i know that the array object is already crowded, but i would like to see the abs method added, especially doing work on the console. Considering that many much less used functions are also implemented as a method, i don't think adding one more would be problematic. greetings Till

Re: [Numpy-discussion] Calling scipy blas from cython is extremely slow

2013-02-23 Thread Sergio Callegari
... and it is not deterministic too... About 1 time over 6 the code calling the scipy blas gives a completely wrong result. How can this be? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Smart way to do this?

2013-02-23 Thread Jose Amoreira
On Saturday, February 23, 2013 00:45:55 Brett Olsen wrote: a = np.ones(30) idx = np.array([2, 3, 2]) a += 2 * np.bincount(idx, minlength=len(a)) a array([ 1., 1., 5., 3., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,

Re: [Numpy-discussion] Calling scipy blas from cython is extremely slow

2013-02-23 Thread Sergio Callegari
Partially fixed. I was messing the row, column order. For some reason this was working in some case. Now I've fixed it and it *always* works. However, it is still slower than the cblas cblas - 0.69 sec scipy blas - 0.74 sec Any clue why? ___

Re: [Numpy-discussion] Smart way to do this?

2013-02-23 Thread Nathaniel Smith
On Sat, Feb 23, 2013 at 4:51 PM, Jose Amoreira ljmamore...@gmail.com wrote: On Saturday, February 23, 2013 00:45:55 Brett Olsen wrote: a = np.ones(30) idx = np.array([2, 3, 2]) a += 2 * np.bincount(idx, minlength=len(a)) a array([ 1., 1., 5., 3., 1., 1., 1., 1., 1., 1., 1., 1., 1.,

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Nathaniel Smith
On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello, i know that the array object is already crowded, but i would like to see the abs method added, especially doing work on the console. Considering that many much less used functions are also implemented as a method,

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Charles R Harris
On Sat, Feb 23, 2013 at 12:25 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello, i know that the array object is already crowded, but i would like to see the abs method added, especially doing work on the console.

Re: [Numpy-discussion] Calling scipy blas f rom cython is extr emely slow

2013-02-23 Thread Jerome Kieffer
On Sat, 23 Feb 2013 18:31:42 + (UTC) Sergio Callegari sergio.calleg...@gmail.com wrote: However, it is still slower than the cblas cblas - 0.69 sec scipy blas - 0.74 sec if you are using scipy blas, the real question is which blas is underneath ? OpenBlas, GotoBlas, Atlas, MKL ? Under

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Robert Kern
On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello, i know that the array object is already crowded, but i would like to see the abs method added, especially doing work on the console.

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread josef . pktd
On Sat, Feb 23, 2013 at 3:33 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello, i know that the array object is already crowded, but i would like to

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Benjamin Root
On Sat, Feb 23, 2013 at 8:20 PM, josef.p...@gmail.com wrote: On Sat, Feb 23, 2013 at 3:33 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello,