I've got some data which I've arranged in the form of [[[0, 1], [2, 3]], [[4, 5], [6,7]]]
, e.g. 3 dimensions. However, the function I'm using requires a numpy
array to work, so I need to convert it from nested lists into one. Whenever I try though I always find that the fist two layers of lists convert, but the final one doesn't? e.g. If I try to print:
print(data) # Prints a numpy.ndarray
print(data[0][0]) # Prints a numpy.ndarray
print(data[0][0][0]) # Prints a list
I've tried a few different methods to convert it, but they all return the data like this? Anyone got any ideas what I can do?