[[ [ ]the dimension of an ndarray can be obtained via its shape methodwhich returns tuple arrays can be reshaped via the reshape method this does not change the current ndarray object to make the change permanenta new instance needs to be created np array range ( )# is an ndarray of shape ( ,print ( shape reshape ( , # is an ndarray of shape ( , print (aprint ( [ ( ,[[ [ [ ]one shape dimension for reshape can be specified as - the dimension is then inferred from the other dimension(sthe 'tattribute of an ndarray gives its transpose note that the transpose of "vectorwith shape (nis the same vector to distinguish between column and row vectorsreshape such vector to an and arrayrespectively np arange ( # array vector of shape ( ,print (aprint ( shape reshape - , array matrix of shape ( , print (bprint ( ta np arange ( reshape ( , print ( [ ( ,[[ [ [ ][[ ][[ [ [ ]two useful methods of joining arrays are hstack and vstackwhere the arrays are joined horizontally and verticallyrespectively np ones (( , ) np zeros (( , ) np hstack (( , )print (