[Numpy-discussion] Request for a bit more info on structured arrays in the "basics" page

Pauli Virtanen pav@iki...
Thu Mar 10 03:21:04 CST 2011

Thu, 10 Mar 2011 15:23:59 +0800, Ralf Gommers wrote:
>> x = np.array([1.5])
>> x.view(int)
>> array([4609434218613702656])

Yes, `view` is meant to do exactly that. Use `astype` if you want a type 


More information about the NumPy-Discussion mailing list