Typeerror: only size-1 arrays can be converted to python scalars: Causes and how to fix
Typeerror: only size-1 arrays can be converted to python scalars, a common error that shows up as a TypeError in the terminal. The major source of this problem is sending an array to a parameter that takes a scalar value.