numpy.expand_dims(a, axis)
Examples
>>> x = ([1,2]) >>> (2,) >>> y = np.expand_dims(x, axis=0) >>> y array([[1, 2]]) >>> (1, 2) >>> y = np.expand_dims(x, axis=1) # Equivalent to x[:,newaxis] >>> y array([[1], [2]]) >>> (2, 1)
The above example of this python to increase the dimensionality of the matrix is all that I have shared with you, I hope to give you a reference, and I hope you will support me more.