isneginf
逐元素测试负无穷,返回结果为稀疏的bool
数组。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
x
|
输入 |
必需 | |
out
|
输出数组 |
None
|
|
可选
|
输出数组 |
None
|
示例
>>> import sparse
>>> x = sparse.as_coo(np.array([-np.inf]))
>>> sparse.isneginf(x).todense()
array([ True])
另请参阅
numpy.isneginf
:等效的 NumPy 函数
源代码位于 sparse/numba_backend/_coo/common.py
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 |
|