Reshaping is the operation of changing the “view” of an array so that the same elements are arranged with new dimensions. In NumPy, reshaping is possible when the total number of elements stays the same. A 2x3 array contains 6 elements, so a 1D array data of length 6 can be reshaped into shape (2, 3) without adding or removing values. Textbooks stress this invariant: the product of the dimensions must equal the original size.
NumPy provides two standard reshaping interfaces: the function np.reshape(data, (2, 3)) and the method data.reshape(2, 3) (or data.reshape((2, 3))). Option A is correct because it uses the official NumPy function with the proper arguments: the original array and the target shape. The shape is passed as a tuple describing rows and columns.
Option B is incorrect because np_reshape is not the correct NumPy function name, and it references an unrelated identifier list. Option C is incorrect because NumPy arrays do not provide a set_shape method like that. Option D is not valid NumPy syntax for reshaping.
Reshaping is fundamental in data analysis and machine learning: it converts flat vectors into matrices, prepares batches of samples, and aligns dimensions for matrix multiplication and broadcasting.