On 05/10/2007, Christopher Barker <[EMAIL PROTECTED]> wrote: > I don't know how to generalize this to n-d though -- maybe numpy.vectorize?
Oops! Looks like there's a big somewhere: In [1]: from numpy import * In [2]: vectorize(lambda x: "%5.3g" % x)(ones((2,2,2))) Out[2]: array([[[' ', '\xc1'], [' ', '\xc1']], [[' ', '\xc1'], [' ', '\xc1']]], dtype='|S1') In [3]: vectorize? Segmentation fault (core dumped) In particular, vectorize creates a string array (rather than an object array), and some unsafe operation is done on that array. Anne _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion