[Numpy-discussion] Different attributes for NumPy types
Thu May 22 14:59:00 CDT 2008
On Thu, May 22, 2008 at 2:46 PM, Charles R Harris
> It also leads to various inconsistencies:
> In : float32(array([]))
> Out: array([[ 1.]], dtype=float32)
> In : float64(array([]))
> Out: 1.0
Okay, so don't do that. Always use x.astype(dtype) or asarray(x, dtype).
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion