np.array.astype code example Example: astype numpy ndarray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)