📌  相关文章
📜  从 ndarray python 代码示例中选择某些元素

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

代码示例1
# arr = [elements]
# new_arr = arr[condition]  
# new_arr = [lements satisfying condition]
arr = [3, 6, 5, 9, 4, 12, 1]
new_arr = arr[arr%2 == 0]
new_arr = [6, 4, 12]