If I do the r=np.arange(0,1.5, 0.01), it's good. But I want to use linspace 
instead. Thanks

On Saturday, September 3, 2022 at 11:19:35 PM UTC+2 Yang Liu wrote:

> Hi,
>
> I want to write a for loop to calculate all possible values, so I declare
>
> r=np.linspace(0,1.5,10)
> for i in range(len(r)):
>       f(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?
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/c5343b13-4ec0-474f-9568-002ae1a6942bn%40googlegroups.com.

Reply via email to