Closed
Description
Discovered in #31799
I couldn't reproduce this without using a np.* NaT sentinel...
>>> idx1 = pd.Index([pd.NA, np.datetime64("nat")])
>>> idx2 = pd.Index([pd.NA, pd.NaT])
>>> tm.assert_index_equal(idx1, idx2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/williamayd/clones/pandas/pandas/_testing.py", line 689, in assert_index_equal
diff = np.sum((left.values != right.values).astype(int)) * 100.0 / len(left)
AttributeError: 'bool' object has no attribute 'astype'