逻辑函数
真值测验
all(a[, axis, out, keepdims])测验是否沿给定轴的一切铁岭-Python NumPy 逻辑函数数组元素求值为True。
>>> np.all([[True,False],[True,True]])
False
>>>
>>> np.all([[True,False],[True,True]], axis=0)
array([ True, False])
any(a[, axis, out, keepdims])测验沿给定轴的任何数组元素的求唐传奇之列值是否为True。
数组内容
isfinite(x, /[, out, where, casting, order, …])逐一测验有限性(不是无穷大仍是不是数字)。
isinf(x, /[, out, where, casting, order, …])逐元素铁岭-Python NumPy 逻辑函数测验正无穷大或负无穷大。
isnan(x, /[, out, where, casting, order, …])对NaN逐一元素进行测验,并将成果作为布尔数组回来。
isnat(x, /[, out, where, casting, order, …])对NaT(不是时刻)逐一铁岭-Python NumPy 逻辑函数元素进行测验,然后将成果作为布尔数组回来。
isneginf(x[,铁岭-Python NumPy 逻辑函数 out])逐项测验负无穷大,将成果作为布尔数组回来。
isposinf(x[, out])对正无穷大逐一元素进行测验,以布尔数组方式回来成果。