GreenWaves-Technologies / bfloat16

bfloat16 dtype for numpy
Apache License 2.0
17 stars 13 forks source link

Exception when checking if two bfloat16 arrays are close #10

Closed UtkarshKunwar closed 4 months ago

UtkarshKunwar commented 4 months ago

image

It fails on doing np.isclose(arr, arr) but works properly when doing np.isclose(arr, arr.astype(np.float64))

sousoux commented 4 months ago

This is intrinsic to the type system in numpy and there is no way around it currently.