I'm currently working with the numpy float array.
My problem is that I'd like to compare them with, say, 3 decimal places.
But when I try to use round or around, it doesn't work.
If you know a way I'd be very grateful.
Here's the code I tried
import numpy as np
x = np.array(([0.32745, -1.043, -0.633], [0.418, -1.038, -1.166]), dtype=float)
y = np.array(([0.32788, -1.043, -0.633], [0.418, -1.038, -1.166]), dtype=float)
x = np.round(x, 3)
y = np.round(y, 3)
if (x == y).all():
print("ok")