For the following input:
import numpy as np
a= np.array([[0.0, 0.0, 0.0],
[1.0, 1.0, -2.234],
[0.0, 0.0, 0.0]])
b= np.array([1.0, 1.0, -2.234])
print(np.isclose(np.transpose(a), b))
Output:
$ python temp.py
--> [[False True False]
[False True False]
[False False False]]
And for following input:
print(np.isclose(a, b))
Output:
$ python temp.py
--> [[False False False]
[ True True True]
[False False False]]
I am unable to understand why np.isclose() is unable to match column element-wise but is able to do it correctly for rows. I think there is something wrong with my understanding.
My intention is to find index of matching column. To achieve this I would be further using .all(axis=) with np.where(). But before this I want to understand the behaviour of np.isclose().