Question from the Python Machine Learning test

Reshape a 2x4 array into a 2x2x2 array in scikit-learn

Easy

Consider vec, an array created like this

vec = numpy.array([[1,2,3,4],[5,6,7,8]])

What is the result of

vec2 = vec.reshape(2,2,2)

?

Author: W3D TeamStatus: PublishedQuestion passed 488 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!