Hi,
I want to write a for loop to calculate all possible values, so I declare
m=a/b #my test case a/b==3/2
r=np.linspace(0,m,10,dtype=float)
for i in range(len(r)):
f(Fraction.from_float(r[i]))
where f is some function I write to print out some function space.
But I get
TypeError: Cannot interpret '1.50000000000000' as a data type
Any idea on how why I get the error?
If I cast m= float(a/b), I can work it out. However, Fraction.from_float(r[i]) in this case will not result in a fraction.