Re: [Numpy-discussion] Strange error taking log of PyObject array

2006-07-10 Thread Tim Hochberg
Travis Oliphant wrote: > Tom Denniston wrote: > >> The following works on a float array but not an object array. It >> gives a very strange error message. >> >> (Pdb) numpy.log(numpy.array([19155613843.7], dtype=object)) >> *** AttributeError: 'float' object has no attribute 'log' >> >>

Re: [Numpy-discussion] Strange error taking log of PyObject array

2006-07-10 Thread Travis Oliphant
Tom Denniston wrote: > The following works on a float array but not an object array. It > gives a very strange error message. > > (Pdb) numpy.log(numpy.array([19155613843.7], dtype=object)) > *** AttributeError: 'float' object has no attribute 'log' > This is expected behavior. For object arra

[Numpy-discussion] Strange error taking log of PyObject array

2006-07-10 Thread Tom Denniston
The following works on a float array but not an object array. It gives a very strange error message. (Pdb) numpy.log(numpy.array([19155613843.7], dtype=object)) *** AttributeError: 'float' object has no attribute 'log' (Pdb) numpy.log([19155613843.7]) array([ 23.67586166]) -