摘要: np.ogrid 和 np.mgrid 函数相似,都是返回一个多维的 meshgrid, 区别是 ogrid 返回开放式,mgrid 返回密集式数组。 而数组中的元素依据 arange 方法来产生。 参数部分需要传入一个列表,例如:[a, b, step] ( a 表示起点,b 表示终点,step 阅读全文
posted @ 2021-09-30 15:06 Hider1214 阅读(1859) 评论(0) 推荐(0)
摘要: 一、np.select函数 1.介绍 np.select 函数根据某些条件筛选某些元素。 使用语法为: import numpy as np np.select(condlist, choicelist, default=0) # 返回列表 参数(必须写成“列表”的形式): condlist -- 阅读全文
posted @ 2021-09-30 14:45 Hider1214 阅读(20424) 评论(0) 推荐(0)