Python, Machine Learning, Artificial Intelligence, Programming, Matrix.
Now if we print out B we will get: [[ 1 2] [ 3 4] [ 5 6] [ 7 8] [ 9 10] [11 12]] Note that when reshaping, the old shape and the new shape must contain the same number of values. For example in this case A contains 12 values, so B must also contain 12 numbers (and in fact 2*6 = 12 ). Create Equally