vectorious
vectorious copied to clipboard
Implement astype(dtype: DType) for simple type casting
- See https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html
Example:
import { array } from 'vectorious';
const x = array([1, 2, 2.5]);
x.astype('int8')
/*
array([ 1, 2, 2 ], dtype=int8)
*/