简洁的方法让NumPy在逻辑索引后返回正确形状的数组,而不进行整形?假设我有阵列: >>> import numpy as np >>> myarr = np.array([[1],[2],[3],[2]]) 我想使用逻辑索引 ...2024-05-15 已阅读: n次