```python import numpy as np # 创建一个二维数组 arr = np.array([[1, 2, 3], [4, 5, 6]]) # 输出数组的维数、行数和列数 print("数组的维数:", arr.ndim) print("数组的行数:", arr.shape[0]) print("数组的列数:", arr.shape[1]) # 调整数组为2行6列 arr_reshaped = arr.reshape(2, 6) print("调整后的数组:\n", arr_reshaped) ``` [2024-10-12 21:48:05 | AI写代码神器 | 142点数解答]