Copy of the array, cast to a specified type.
t : str or dtype
Typecode or data-type to which the array is cast.
ComplexWarning : :
When casting from complex to float or int. To avoid this, one should use a.real.astype(t).
Examples
>>> x = np.array([1, 2, 2.5]) >>> x array([ 1. , 2. , 2.5])
>>> x.astype(int) array([1, 2, 2])
numpy.ndarray.dumps
numpy.ndarray.byteswap
Enter search terms or a module, class or function name.