arkouda icon indicating copy to clipboard operation
arkouda copied to clipboard

Make scalar cast functions that alias numpy

Open stress-tess opened this issue 2 years ago • 0 comments

Add the ability to cast scalars as arkouda dtypes. This will just be alias of the same functionality in numpy since our dtypes are an alias of numpy dtypes

>>> ak.float64
dtype('float64')

>>> np.float64
numpy.float64

>>> ak.float64 == np.float64
True

>>> np.float64(5.0)
5.0

>>> ak.float64(5.0)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [9], in <cell line: 1>()
----> 1 ak.float64(5.0)

TypeError: 'numpy.dtype[float64]' object is not callable

stress-tess avatar Jul 15 '22 16:07 stress-tess