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
fromjaximportlaxx=lax.convert_element_type(1, 'int16', weak_type=True)
print(x)
# DeviceArray(1, dtype=int16)print(x+1)
# TypeError: add requires arguments to have the same dtypes, got int16, int32.
The reason this happens is due to something @mattjj noted in #6000; dtypes.result_type essentially canonicalizes all weak types before doing any promotion
The text was updated successfully, but these errors were encountered:
The reason this happens is due to something @mattjj noted in #6000;
dtypes.result_type
essentially canonicalizes all weak types before doing any promotionThe text was updated successfully, but these errors were encountered: