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.__version__ > Out[5]: '2.0.0.dev8297' > > Thoughts? Nope, but it's likely my bad. Smells a bit like the dtype '>c' has size 0 that doesn't get automatically adjusted in the array constructor, so you end up assigning size-1 string to size-0 array element... Which is strange sice I don't think this particular code path has been changed at all. One would have to follow the C execution path with gdb to find out what goes wrong. -- Pauli Virtanen _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion