for t in s.strip('[]').split(';'):
    tok.append('[' + ','.join(t.strip().split(' ')) + ']')
b = eval('[' + ','.join(tok) + ']')
return np.array(b)
Converting a matrix created with MATLAB to Numpy array with a similar syntax