We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data
ValueError
numpy.ndarray.data attribute doesn't work with ml_dtypes.
bfloat16 example:
from ml_dtypes import bfloat16 x = np.array([0], dtype=bfloat16) x.data # ValueError: cannot include dtype 'E' in a buffer
float8_e4m3fnuz example:
from ml_dtypes import float8_e4m3fnuz x = np.array([0], dtype=float8_e4m3fnuz) x.data # ValueError: cannot include dtype 'G' in a buffer
Current workaround is by using the __array_interface__ attribute:
__array_interface__
x.__array_interface__['data'][0]
ml_dtypes version: 0.2.0 numpy version: 1.24.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
numpy.ndarray.data attribute doesn't work with ml_dtypes.
bfloat16 example:
float8_e4m3fnuz example:
Current workaround is by using the
__array_interface__
attribute:ml_dtypes version: 0.2.0
numpy version: 1.24.3
The text was updated successfully, but these errors were encountered: