Q:

TypeError: only size-1 arrays can be converted to Python scalars

You are getting the error "only length-1 arrays can be converted to 
"Python scalars" is because when the function expects a single value instead of that you have passed an array.
1

New to Communities?

Join the community