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

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

2010-03-20 Thread Ryan May
The following code, which works with numpy 1.4.0, results in an error: In [1]: import numpy as np In [2]: v = 'm' In [3]: dt = np.dtype('>c') In [4]: a = np.asarray(v, dt) On 1.4.0: In [5]: a Out[5]: array('m', dtype='|S1') In [6]: np.__version__ Out[6]: '1.4.0' On SVN trunk: /home/rmay/