Re: [Numpy-discussion] label NA and datetime as experimental

2012-03-26 Thread Richard Hattersley
Hi, My team are currently experimenting with extending datetime to allow alternative, non-physical calendars (e.g. 360-day used by climate modellers). Once we've got a handle on the options we'd like to propose the extensions/changes back to NumPy. Obviously we'd like to avoid wasted effort, so

[Numpy-discussion] Linking against MKL but still slow?

2012-03-26 Thread Christoph Dann
Dear list, so far I used Enthoughts Python Distribution which contains a compiled version of numpy linked against MKL. Now, I want to implement my own extensions to numpy, so I need my build numpy on my own. So, I installed Intel Parallel studio including MKL and the C / Fortran compilers. I

[Numpy-discussion] Linking against MKL but still slow?

2012-03-26 Thread Christoph Dann
Dear list, so far I used Enthoughts Python Distribution which contains a compiled version of numpy linked against MKL. Now, I want to implement my own extensions to numpy, so I need my build numpy on my own. So, I installed Intel Parallel studio including MKL and the C / Fortran compilers. I

Re: [Numpy-discussion] Linking against MKL but still slow?

2012-03-26 Thread David Cournapeau
Hi Christoph, On Mon, Mar 26, 2012 at 10:06 AM, Christoph Dann ch.ro.d...@googlemail.comwrote: Dear list, so far I used Enthoughts Python Distribution which contains a compiled version of numpy linked against MKL. Now, I want to implement my own extensions to numpy, so I need my build numpy

Re: [Numpy-discussion] label NA and datetime as experimental

2012-03-26 Thread Charles R Harris
On Mon, Mar 26, 2012 at 2:29 AM, Richard Hattersley rhatters...@gmail.comwrote: Hi, My team are currently experimenting with extending datetime to allow alternative, non-physical calendars (e.g. 360-day used by climate modellers). Once we've got a handle on the options we'd like to propose

Re: [Numpy-discussion] label NA and datetime as experimental

2012-03-26 Thread Ralf Gommers
On Mon, Mar 26, 2012 at 5:42 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Mar 26, 2012 at 2:29 AM, Richard Hattersley rhatters...@gmail.com wrote: Hi, My team are currently experimenting with extending datetime to allow alternative, non-physical calendars (e.g. 360-day

Re: [Numpy-discussion] label NA and datetime as experimental

2012-03-26 Thread Richard Hattersley
OK - that's useful feedback. Thanks! On 26 March 2012 21:03, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Mar 26, 2012 at 5:42 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Mar 26, 2012 at 2:29 AM, Richard Hattersley rhatters...@gmail.com wrote: Hi, My

[Numpy-discussion] arg searchsorted

2012-03-26 Thread Bryan Van de Ven
I recently got asked about an arg version of searchsorted, basically a version that could take a sorter as an additional argument. For instance: In [13]: a = np.array([5,6,8,1,6,9,0]) In [14]: s = np.argsort(a) In [17]: s Out[17]: array([6, 3, 0, 1, 4, 2, 5]) In [18]:

Re: [Numpy-discussion] arg searchsorted

2012-03-26 Thread Charles R Harris
On Mon, Mar 26, 2012 at 3:34 PM, Bryan Van de Ven bry...@continuum.iowrote: I recently got asked about an arg version of searchsorted, basically a version that could take a sorter as an additional argument. For instance: In [13]: a = np.array([5,6,8,1,6,9,0]) In [14]: s =

Re: [Numpy-discussion] arg searchsorted

2012-03-26 Thread Bryan Van de Ven
On 3/26/12 4:57 PM, Charles R Harris wrote: On Mon, Mar 26, 2012 at 3:34 PM, Bryan Van de Ven bry...@continuum.io mailto:bry...@continuum.io wrote: I recently got asked about an arg version of searchsorted, basically a version that could take a sorter as an additional argument.

[Numpy-discussion] How to Extract the Number of Rows and Columns in a Matrix

2012-03-26 Thread Stephanie Cooke
Hello, I would like to extract the number of rows and columns of a matrix individually. The shape command outputs the rows and columns together, but are there commands that will separately give the rows and separately give the columns? Thanks ___

Re: [Numpy-discussion] How to Extract the Number of Rows and Columns in a Matrix

2012-03-26 Thread Olivier Delalleau
len(M) will give you the number of rows of M. For columns I just use M.shape[1] myself, I don't know if there exists a shortcut. -=- Olivier Le 26 mars 2012 19:03, Stephanie Cooke cooke.stepha...@gmail.com a écrit : Hello, I would like to extract the number of rows and columns of a matrix

Re: [Numpy-discussion] arg searchsorted

2012-03-26 Thread Charles R Harris
On Mon, Mar 26, 2012 at 4:32 PM, Bryan Van de Ven bry...@continuum.iowrote: On 3/26/12 4:57 PM, Charles R Harris wrote: On Mon, Mar 26, 2012 at 3:34 PM, Bryan Van de Ven bry...@continuum.iowrote: I recently got asked about an arg version of searchsorted, basically a version that could

Re: [Numpy-discussion] How to Extract the Number of Rows and Columns in a Matrix

2012-03-26 Thread Derek Homeier
On 27.03.2012, at 1:26AM, Olivier Delalleau wrote: len(M) will give you the number of rows of M. For columns I just use M.shape[1] myself, I don't know if there exists a shortcut. You can use tuple unpacking, if that helps keeping your code conciser… nrow, ncol = M.shape Cheers,

[Numpy-discussion] AttributeError with shape command

2012-03-26 Thread Stephanie Cooke
Hello, I am new to numpy. When I try to use the command array.shape, I get the following error: AttributeError: 'list' object has no attribute 'shape' Is anyone familiar with this type of error? Thanks ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] AttributeError with shape command

2012-03-26 Thread Derek Homeier
On 27.03.2012, at 2:07AM, Stephanie Cooke wrote: I am new to numpy. When I try to use the command array.shape, I get the following error: AttributeError: 'list' object has no attribute 'shape' Is anyone familiar with this type of error? It means 'array' actually is not one, more

Re: [Numpy-discussion] AttributeError with shape command

2012-03-26 Thread Olivier Delalleau
It means array is a regular Python list and not a numpy array. Use numpy.array(array) to convert it into an array. -=- Olivier Le 26 mars 2012 20:07, Stephanie Cooke cooke.stepha...@gmail.com a écrit : Hello, I am new to numpy. When I try to use the command array.shape, I get the following