📜  square python np - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:27.903000             🧑  作者: Mango

代码示例1
import numpy as np

# ints
array_2d = np.array([[1, 2, 3], [4, 5, 6]])

print(f'Source Array:\n{array_2d}')

array_2d_square = np.square(array_2d)

print(f'Squared Array:\n{array_2d_square}')