-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
import jax.numpy as jnp
import numpy as np
>>> np.arange(10).astype(ml_dtypes.float8_e4m3b11fnuz).dtype.str
'<V1'
>>> np.arange(10).astype(ml_dtypes.float8_e4m3fn).dtype.str
'<V1'
>>> np.arange(10).astype(ml_dtypes.float8_e4m3).dtype.str
'<V1'
>>> np.asarray(jnp.arange(10).astype(jnp.float8_e3m4)).dtype.str
'<V1'I just want to point out how big of a footgun this is, and it seems fundamentally misguided by mapping all the above dtypes to have the same kNpyDescrKind:
ml_dtypes/ml_dtypes/_src/dtypes.cc
Line 87 in d44671c
| static constexpr char kNpyDescrKind = 'V'; // Void |
Though I doubt we would want to change this now because of backwards compatibility.
Metadata
Metadata
Assignees
Labels
No labels