vectorious icon indicating copy to clipboard operation
vectorious copied to clipboard

Implement astype(dtype: DType) for simple type casting

Open mateogianolio opened this issue 1 year ago • 0 comments

  • 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)
*/

mateogianolio avatar Jun 12 '23 22:06 mateogianolio