Consider this simple evaluation:
import numpy as np
aa = np.array([[np.nan, np.nan], [1.64, 0.0784]])
bb = [[np.nan, np.nan], [1.64, 0.0784]]
np.all(aa == bb)
This returns False
, even though the aa
array is equal to the bb
list. If I try this for each element in aa, bb
I get:
np.all(aa[0] == bb[0])
False
np.all(aa[1] == bb[1])
True
Which means the nan
values are the issue here. Why is this happening?