Re: [Numpy-discussion] numpy.trapz() doesn't respect subclass

2010-03-21 Thread josef . pktd
On Mon, Mar 22, 2010 at 12:49 AM, Ryan May wrote: > Hi, > > I found that trapz() doesn't work with subclasses: > > http://projects.scipy.org/numpy/ticket/1438 > > A simple patch (attached) to change asarray() to asanyarray() fixes > the problem fine. Are you sure this function works with matrices

[Numpy-discussion] numpy.trapz() doesn't respect subclass

2010-03-21 Thread Ryan May
Hi, I found that trapz() doesn't work with subclasses: http://projects.scipy.org/numpy/ticket/1438 A simple patch (attached) to change asarray() to asanyarray() fixes the problem fine. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma fix_trapz_subcla

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Ralf Gommers
On Mon, Mar 22, 2010 at 12:27 AM, Alan G Isaac wrote: > >> On 3/21/2010 12:54 AM, Ralf Gommers wrote: > >>> too many blank lines are needed > > > > On Sun, Mar 21, 2010 at 9:51 PM, Alan G Isaac > > wrote: > >> Please define "need" after seeing the compact example

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Charles R Harris
On Sun, Mar 21, 2010 at 8:53 AM, Ralf Gommers wrote: > > > On Sun, Mar 21, 2010 at 10:41 PM, wrote: > >> On Sun, Mar 21, 2010 at 10:16 AM, Ralf Gommers >> wrote: >> >> > Both look sort of okay, but are abusing the syntax. >> > >> > What do you think about the following: >> > 1. Do not use lists

Re: [Numpy-discussion] Array bug with character (regression from 1.4.0)

2010-03-21 Thread Ryan May
On Sun, Mar 21, 2010 at 5:29 PM, Pauli Virtanen wrote: > su, 2010-03-21 kello 16:13 -0600, Charles R Harris kirjoitti: >> I was wondering if this was related to Michael's fixes for >> character arrays? A little bisection might help localize the problem. > > It's a bug I introduced in r8144... I fo

Re: [Numpy-discussion] Array bug with character (regression from 1.4.0)

2010-03-21 Thread Charles R Harris
On Sun, Mar 21, 2010 at 4:29 PM, Pauli Virtanen wrote: > su, 2010-03-21 kello 16:13 -0600, Charles R Harris kirjoitti: > > I was wondering if this was related to Michael's fixes for > > character arrays? A little bisection might help localize the problem. > > It's a bug I introduced in r8144... I

Re: [Numpy-discussion] Array bug with character (regression from 1.4.0)

2010-03-21 Thread Pauli Virtanen
su, 2010-03-21 kello 16:13 -0600, Charles R Harris kirjoitti: > I was wondering if this was related to Michael's fixes for > character arrays? A little bisection might help localize the problem. It's a bug I introduced in r8144... I forgot one *can* assign strings to 0-d arrays, and strings are in

Re: [Numpy-discussion] Array bug with character (regression from 1.4.0)

2010-03-21 Thread Charles R Harris
On Sun, Mar 21, 2010 at 4:08 PM, Pauli Virtanen wrote: > Ryan May wrote: > > The following code, which works with numpy 1.4.0, results in an error: > > Python 2.6, I presume? > > > In [1]: import numpy as np > > In [2]: v = 'm' > > In [3]: dt = np.dtype('>c') > > In [4]: a = np.asarray(v, dt) > >

Re: [Numpy-discussion] Array bug with character (regression from 1.4.0)

2010-03-21 Thread Pauli Virtanen
Ryan May wrote: > The following code, which works with numpy 1.4.0, results in an error: Python 2.6, I presume? > In [1]: import numpy as np > In [2]: v = 'm' > In [3]: dt = np.dtype('>c') > In [4]: a = np.asarray(v, dt) > > On SVN trunk: > ValueError: assignment to 0-d array > > In [5]: np.__ver

Re: [Numpy-discussion] [OT] Starving CPUs article featured in IEEE's ComputingNow portal

2010-03-21 Thread Sebastian Walter
On Fri, Mar 19, 2010 at 11:18 PM, David Warde-Farley wrote: > On 19-Mar-10, at 1:13 PM, Anne Archibald wrote: > >> I'm not knocking numpy; it does (almost) the best it can. (I'm not >> sure of the optimality of the order in which ufuncs are executed; I >> think some optimizations there are possib

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Alan G Isaac
>> On 3/21/2010 12:54 AM, Ralf Gommers wrote: >>> too many blank lines are needed > On Sun, Mar 21, 2010 at 9:51 PM, Alan G Isaac > wrote: >> Please define "need" after seeing the compact example I posted. On 3/21/2010 9:58 AM, Ralf Gommers wrote: > You ne

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Ralf Gommers
On Sun, Mar 21, 2010 at 10:41 PM, wrote: > On Sun, Mar 21, 2010 at 10:16 AM, Ralf Gommers > wrote: > > > Both look sort of okay, but are abusing the syntax. > > > > What do you think about the following: > > 1. Do not use lists with multiple indentation levels, it just doesn't > look > > good an

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread josef . pktd
On Sun, Mar 21, 2010 at 10:16 AM, Ralf Gommers wrote: > > > On Sun, Mar 21, 2010 at 9:57 PM, wrote: >> >> On Sun, Mar 21, 2010 at 9:51 AM, Alan G Isaac wrote: >> > On 3/21/2010 12:54 AM, Ralf Gommers wrote: >> >> too many blank lines are needed >> > >> > Please define "need" after seeing the com

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Charles R Harris
On Sun, Mar 21, 2010 at 8:01 AM, Ralf Gommers wrote: > > > On Sun, Mar 21, 2010 at 9:58 PM, Ralf Gommers > wrote: > >> >> >> On Sun, Mar 21, 2010 at 9:51 PM, Alan G Isaac wrote: >> >>> On 3/21/2010 12:54 AM, Ralf Gommers wrote: >>> > too many blank lines are needed >>> >>> Please define "need" af

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Ralf Gommers
On Sun, Mar 21, 2010 at 9:57 PM, wrote: > On Sun, Mar 21, 2010 at 9:51 AM, Alan G Isaac wrote: > > On 3/21/2010 12:54 AM, Ralf Gommers wrote: > >> too many blank lines are needed > > > > Please define "need" after seeing the compact example I posted. > > > > Personally, I think reST makes the ri

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Ralf Gommers
On Sun, Mar 21, 2010 at 9:58 PM, Ralf Gommers wrote: > > > On Sun, Mar 21, 2010 at 9:51 PM, Alan G Isaac wrote: > >> On 3/21/2010 12:54 AM, Ralf Gommers wrote: >> > too many blank lines are needed >> >> Please define "need" after seeing the compact example I posted. >> >> You need 4 blank lines i

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Ralf Gommers
On Sun, Mar 21, 2010 at 9:51 PM, Alan G Isaac wrote: > On 3/21/2010 12:54 AM, Ralf Gommers wrote: > > too many blank lines are needed > > Please define "need" after seeing the compact example I posted. > > You need 4 blank lines in your example. Now I tried adding a description for the first argu

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread josef . pktd
On Sun, Mar 21, 2010 at 9:51 AM, Alan G Isaac wrote: > On 3/21/2010 12:54 AM, Ralf Gommers wrote: >> too many blank lines are needed > > Please define "need" after seeing the compact example I posted. > > Personally, I think reST makes the right trade-offs, > minimizing markup within the constrain

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Alan G Isaac
On 3/21/2010 12:54 AM, Ralf Gommers wrote: > too many blank lines are needed Please define "need" after seeing the compact example I posted. Personally, I think reST makes the right trade-offs, minimizing markup within the constraint of being unambiguous. Alan Isaac _

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Alan G Isaac
On 3/21/2010 12:47 AM, josef.p...@gmail.com wrote: > dashes would be also ok, but I don't think rst would recognize them. It does. But again, a definition list (using indentation) is also a list structure. It needs no markup besides the indentation. > My main problem with rst is that it doesn't

Re: [Numpy-discussion] Help!!! Docstrings overrun by markup crap.

2010-03-21 Thread Alan G Isaac
On 3/21/2010 12:24 AM, Charles R Harris wrote: > I really, really want to get rid of the asterisks, they are ugly and > distracting (IMHO). I agree, which is why my deflist example did not use asterisks. I consider it readable and only very slightly verbose. (The blank lines are needed by reST, b