numpy
的argwhere
函数用于返回数组中非0
元素的坐标。
import numpy as np
a = np.arange(6).reshape(2, 3)
print("a =", a)
b = np.argwhere(<
numpy
的argwhere
函数用于返回数组中非0
元素的坐标。
import numpy as np
a = np.arange(6).reshape(2, 3)
print("a =", a)
b = np.argwhere(<