Before you mark this question as a duplicate, please read through the entire post...
I have a list of lists that looks something like...
>>> print(list_of_lists)
[[3, 3, 7, 8, 5], [9, 3, 3, 3, 3], [9, 10, 11, 3, 23, 3, 3], [20, 3, 3, 3, 3, 3, 3, 3], [20, 3, 3, 3, 3, 3, 3]]
I want to convert this list of lists into an array. However, when I do:
potential_numpy_array = numpy.array(list_of_lists)
or:
potential_numpy_array = numpy.asarray(list_of_lists)
I get something stranger:
>>> print(potential_numpy_array)
[list([3, 3, 17, 18, 16]) list([20, 3, 3, 3, 3]) list([20, 5, 6, 3, 12, 3, 3]) list([9, 3, 3, 3, 3, 3, 3, 3]) list([9, 3, 3, 3, 3, 3, 3])]
I've looked at many other questions but did not find an answer that could solve this problem.
Could someone please help me identify the source of confusion?
Thanks!