[Numpy-discussion] Regression in choose()

2011-06-15 Thread Ed Schofield
Hi all, I have been investigation the limitation of the choose() method (and function) to 32 elements. This is a regression in recent versions of NumPy. I have tested choose() in the following NumPy versions: 1.0.4: fine 1.1.1: bug 1.2.1: fine 1.3.0: bug 1.4.x: bug 1.5.x: bug 1.6.x: bug Numeric 2

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-15 Thread Sturla Molden
Den 15.06.2011 23:22, skrev Christopher Barker: > > I think the issue got confused -- the OP was not looking to speed up a > matrix multiply, but rather to speed up a whole bunch of independent > matrix multiplies. I would do it like this: 1. Write a Fortran function that make multiple calls DGEM

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-15 Thread Sturla Molden
Den 15.06.2011 23:22, skrev Christopher Barker: > > It would also would be great if someone that actually understands this > stuff could look at his code and explain why the slowdown occurs (hint, > hint!) > Not sure I qualify, but I think I notice several potential problems in the OP's multiproc

Re: [Numpy-discussion] Behaviour of ndarray and other objects with __radd__?

2011-06-15 Thread Jonathan Taylor
Ok. I suspected it was something of that sort and that certainly makes sense to have this ability. Can we perhaps add this to the documentation/specification so that we can more confident that this behavior remains into the future? Thanks, Jonathan. On Wed, Jun 15, 2011 at 11:46 AM, Charles R H

Re: [Numpy-discussion] code review/build & test for datetime business day API

2011-06-15 Thread Derek Homeier
On 15.06.2011, at 1:34AM, Mark Wiebe wrote: > These functions are now fully implemented and documented. As always, code > reviews are welcome here: > > https://github.com/numpy/numpy/pull/87 > > and for those that don't want to dig into review C code, the commit for the > documentation is here

Re: [Numpy-discussion] tighten up ufunc casting rule

2011-06-15 Thread Mark Wiebe
On Tue, Jun 7, 2011 at 2:08 PM, Ralf Gommers wrote: > On Tue, Jun 7, 2011 at 8:59 PM, Mark Wiebe wrote: > >> On Tue, Jun 7, 2011 at 1:41 PM, Ralf Gommers > > wrote: >> >>> On Mon, Jun 6, 2011 at 6:56 PM, Mark Wiebe wrote: >>> On Mon, Jun 6, 2011 at 10:30 AM, Mark Wiebe wrote: > On

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-15 Thread Christopher Barker
Sturla Molden wrote: > IMHO, trying to beat Intel or AMD performance library developers with > Python, NumPy and multiprocessing is just silly. Nothing we do with > array operator * and np.sum is ever going to compare with BLAS functions > from these libraries. I think the issue got confused --

[Numpy-discussion] datetimes with date vs time units, local time, and time zones

2011-06-15 Thread Mark Wiebe
Towards a reasonable behavior with regard to local times, I've made the default repr for datetimes use the C standard library to print them in a local ISO format. Combined with the ISO8601-prescribed behavior of interpreting datetime strings with no timezone specifier to be in local times, this all

[Numpy-discussion] Unicode characters in a numpy array

2011-06-15 Thread Gökhan Sever
Hello, The following snippet works fine for a regular string and prints out the string without a problem. python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> mystr = u"öööğ

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-15 Thread Sturla Molden
Perhaps it is time to write somthing in the SciPy cookbook about parallel computing with NumPy? It seems to be certain problems that are discussed again and again. These are some issues that come to mind (I'm sure there is more): - The difference between I/O bound, memory bound, and CPU bound w

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-15 Thread Sturla Molden
Den 13.06.2011 19:51, skrev srean: > If you are on an intel machine and you have MKL libraries around I > would strongly recommend that you use the matrix multiplication > routine if possible. MKL will do the parallelization for you. Well, > any good BLAS implementation would do the same, you dont

Re: [Numpy-discussion] what python module to handle csv?

2011-06-15 Thread Olivier Delalleau
Using savetxt with delimiter=',' should do the trick. If you want a more advanced csv interface to e.g. save more than a numpy array into a single csv, you can probably look into the python csv module. -=- Olivier 2011/6/15 Chao YUE > Dear all pythoners, > > what do you use python module to ha

[Numpy-discussion] what python module to handle csv?

2011-06-15 Thread Chao YUE
Dear all pythoners, what do you use python module to handle csv file (for reading we can use numpy.genfromtxt)? is there anyone we can do with csv file very convinient as that in R? can numpy.genfromtxt be used as writing? (I didn't try this yet because on our server we have only numpy 1.0.1...).

Re: [Numpy-discussion] Behaviour of ndarray and other objects with __radd__?

2011-06-15 Thread Charles R Harris
On Wed, Jun 15, 2011 at 9:34 AM, Olivier Delalleau wrote: > I don't really understand this behavior either, but juste note that > according to > http://docs.scipy.org/doc/numpy/user/c-info.beyond-basics.html > "This attribute can also be defined by objects that are not sub-types of > the ndarray"

Re: [Numpy-discussion] Behaviour of ndarray and other objects with __radd__?

2011-06-15 Thread Olivier Delalleau
I don't really understand this behavior either, but juste note that according to http://docs.scipy.org/doc/numpy/user/c-info.beyond-basics.html "This attribute can also be defined by objects that are not sub-types of the ndarray" -=- Olivier 2011/6/15 Jonathan Taylor > Hi, > > I would like to h

[Numpy-discussion] Behaviour of ndarray and other objects with __radd__?

2011-06-15 Thread Jonathan Taylor
Hi, I would like to have objects that I can mix with ndarrays in arithmetic expressions but I need my object to have control of the operation even when it is on the right hand side of the equation. I realize from the documentation that the way to do this is to actually subclass ndarray but this i

Re: [Numpy-discussion] Adjacent matrix

2011-06-15 Thread Thiago Franco Moraes
On Tue, Jun 14, 2011 at 6:30 PM, Gael Varoquaux wrote: > On Tue, Jun 14, 2011 at 10:29:38AM -0300, Thiago Franco Moraes wrote: >> I don't know if I understand. The idea is to use _make_edges_3d to >> give me the connectivity, isn't it? Like for example, a 3x3 image: > >> 0, 1, 2 >> 3, 4, 5 >> 6, 7