import numpy as np
a = np.array([[1., 2., 3.],
[4., 5., 'a']], dtype=object)
b = np.array([[1.00000001, 2., 3.],
[4., 5., 'a']], dtype=object)
print(a == b)
actual output:
[[False True True]
[ True True True]]
expected output (since 1.00000001 is close enough to 1):
[[True True True]
[True True True]]
I cannot use numpy.isclose()
because there is non-numerical part in the array.