[Numpy-discussion] Cast problems .... doo dah, doo dah

Mathew Yeates mathew at comma.jpl.nasa.gov
Wed Sep 25 17:24:04 CDT 2002

The following code produces an error

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: Array can not be safely cast to required type

I suppose I might need to cast b to Float32. But, I have a function 
which is passed a and b
as args. Ideally, I would like a function which casts a and b to the 
highest compatible type since
"choose" doesnt do it. How can I do this simply?


M47h3w `/34735

More information about the Numpy-discussion mailing list