import numpy as np

# 定义一个numpy数组
array = np.array([
    [1, 2, 3],
    [2, 3, 4]
])

print(array)
# 维度
print("number of dim:", array.ndim)
# 矩阵形状
print("shape :", array.shape)
# 矩阵大小
print("size :", array.size)

d7e760fbebe938ab1a95259a105de7bd4e0b2127
<mask token>

<mask token>
print(array)
print('number of dim:', array.ndim)
print('shape :', array.shape)
print('size :', array.size)

<mask token>
array = np.array([[1, 2, 3], [2, 3, 4]])
print(array)
print('number of dim:', array.ndim)
print('shape :', array.shape)
print('size :', array.size)

import numpy as np
array = np.array([[1, 2, 3], [2, 3, 4]])
print(array)
print('number of dim:', array.ndim)
print('shape :', array.shape)
print('size :', array.size)

import numpy as np

# 定义一个numpy数组
array = np.array([
    [1, 2, 3],
    [2, 3, 4]
])

print(array)
# 维度
print("number of dim:", array.ndim)
# 矩阵形状
print("shape :", array.shape)
# 矩阵大小
print("size :", array.size)
