https://researchdatapod.com/python-typeerror-only-size-1-arrays-can-be-converted-to-python-scalars/
How to Solve Python TypeError: only size-1 arrays can be converted to Python scalars