I must convert a list (whose elements are arrays) into list. When printed its content is as follows:
[
array([[100.1, 120.4, 156.4, 458.5, 0.99]], dtype=float32),
array([[120.3, 168.9, 169.3, 770.2, 0.89]], dtype=float32),
array([[850.1, 671.5, 222.1, 563.4, 0.88]], dtype=float32)
]
What I need is some list which is json serializable. Because when I use json.dump, it's returning:
TypeError: Object of type ndarray is not JSON serializable
I know that it is still list but with arrays as its elements. How do I convert it properly?