7.5.36.63. dtype¶
- Array.dtype
Data-type of the array’s elements.
Warning
Setting
arr.dtype
is discouraged and may be deprecated in the future. Setting will replace thedtype
without modifying the memory (see also ndarray.view and ndarray.astype).7.5.36.63. Parameters¶
None
7.5.36.63. Returns¶
d : numpy dtype object
7.5.36.63. See Also¶
ndarray.astype : Cast the values contained in the array to a new data-type. ndarray.view : Create a view of the same data but a different data-type. numpy.dtype
7.5.36.63. Examples¶
>>> x array([[0, 1], [2, 3]]) >>> x.dtype dtype('int32') >>> type(x.dtype) <type 'numpy.dtype'>