You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import numpy as np, ml_dtypes
In [2]: np.arange(4, dtype=ml_dtypes.bfloat16) + 10
Out[2]: array([10, 11, 12, 13], dtype=bfloat16)
With NumPy 2.1.0
In [1]: import numpy as np, ml_dtypes
In [2]: np.arange(4, dtype=ml_dtypes.bfloat16) + 10
Out[2]: array([10., 11., 12., 13.], dtype=float32)
A promotion behavior change is not surprising, necessarily, but we'd actually expect the NumPy 1 behavior on NumPy 2, since the type of the scalar should be weak.
The text was updated successfully, but these errors were encountered:
With NumPy 1.26.4
With NumPy 2.1.0
A promotion behavior change is not surprising, necessarily, but we'd actually expect the NumPy 1 behavior on NumPy 2, since the type of the scalar should be weak.
The text was updated successfully, but these errors were encountered: