I have a numpy array of shape (120,1). The second dimension is a string of numbers for example:
mat = array([['010000000000000'],
['000000000000000']])
So this matrix (mat) is of shape (2,1). I want to change it to shape (2,15) where 15 is length of each string in the array. So the original matrix will become (120,len(string)).
Desired output:
desired = array([[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]])
How can I achieve this? Insights will be appreciated.