I have numpy arrays as follows.
x = array([0.1])
y = array([0.2])
z= array([-0.05])
I want to get the value of them as a number. Therefore, I did the follwoing.
print(x.tolist()[0])
print(y.tolist()[0])
print(z.tolist()[0])
However, it gave me the following results which is incorrect.
0.09999999999999996
0.19999999999999998
-0.049999999999999975
I am wondering if there is a way to get 0.1, 0.2, -0.05
respectively.
I am happy to provide more details if needed.