Due to using a combination of not entirely compatible software packages, I need to be able to read a CSV file whose elements are stylized as Numpy arrays. An example of such a CSV would be the one below:
When using genfromtxt('Input.csv',delimiter=',',dtype=None,encoding=None)
, I get output of the form:
[['[4 3 2 1]' '[1 1 0 0]']
['[1 3 4 2]' '[0 1 1 0]']]
What I would like is to get this into the form of a three-dimensional Numpy array like below:
[[[4 3 2 1] [1 1 0 0]]
[[1 3 4 2] [0 1 1 0]]]