ndarray.dtype

ndarray.dtype

Data-type of the array’s elements.

Returns:
numpy.dtype

This NDArray’s data type.

Examples

>>> x = np.zeros((2,3))
>>> x.dtype
dtype('float32')
>>> y = np.zeros((2,3), dtype='int32')
>>> y.dtype
dtype('int32')