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 arrays the ufuncs look to the 
objects themselves for implementation.   In this case.  The ufunc tries 
to call the log method of each entry in the array.  The first entry is a 
float (which as the error shows) does not have a log attribute and so 
you get a failure.

-Travis



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to