Suppose I have
>>> np.array([[0,0],[0,1],[1,0],[1,1]])
array([[0, 0],
[0, 1],
[1, 0],
[1, 1]])
This is a matrix, each of lines of which can be regarded as binary representation of some number, so it is
>>> np.array([[0],[1],[2],[3]])
array([[0],
[1],
[2],
[3]])
How to calculate this transformation in shortest way in Python?