Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
ds-ipynb-zh
提交
23192bb3
D
ds-ipynb-zh
项目概览
OpenDocCN
/
ds-ipynb-zh
10 个月 前同步成功
通知
1
Star
74
Fork
24
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
ds-ipynb-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
23192bb3
编写于
1月 04, 2019
作者:
W
wizardforcel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
9.8
上级
34f2528b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
docs/9.8.md
docs/9.8.md
+9
-9
未找到文件。
docs/9.8.md
浏览文件 @
23192bb3
...
...
@@ -97,11 +97,11 @@ x == 3 # 等于
此处显示了比较运算符及其等价
`ufunc`
的摘要:
| 运算符
| 等价 ufunc || 运算符 | 等价 ufunc
|
|
---------------|---------------------||---------------|---------------------
|
|
``==``
|
``np.equal``
||
``!=``
|
``np.not_equal``
|
|
``<``
|
``np.less``
||
``<=``
|
``np.less_equal``
|
|
``>``
|
``np.greater``
||
``>=``
|
``np.greater_equal``
|
| 运算符
| 等价 ufunc | 运算符 | 等价 ufunc
|
|
--- | --- | --- | ---
|
|
``==``
|
``np.equal``
|
``!=``
|
``np.not_equal``
|
|
``<``
|
``np.less``
|
``<=``
|
``np.less_equal``
|
|
``>``
|
``np.greater``
|
``>=``
|
``np.greater_equal``
|
就像算术
`ufunc`
的情况一样,这些适用于任何大小和形状的数组。这是一个二维的例子:
...
...
@@ -236,10 +236,10 @@ np.sum(~( (inches <= 0.5) | (inches >= 1) ))
在数组上组合比较运算符和布尔运算符。可以实现广泛的高效逻辑运算。下表总结了按位布尔运算符及其等效的`
ufunc
`:
| 运算符
| 等价 ufunc || 运算符 | 等价 ufunc
|
|
---------------|---------------------||---------------|---------------------
|
|
``&`` |``np.bitwise_and`` || <code>|</code> |``np.bitwise_or``
|
|
``^`` |``np.bitwise_xor`` ||``~`` |``np.bitwise_not``
|
| 运算符
| 等价 ufunc | 运算符 | 等价 ufunc
|
|
--- | --- | --- | ---
|
|
``&`` | ``np.bitwise_and`` | <code>|</code> | ``np.bitwise_or``
|
|
``^`` | ``np.bitwise_xor`` | ``~`` | ``np.bitwise_not``
|
使用这些工具,我们可以开始回答有关天气数据的问题。以下是将掩码聚合结合使用时,可以计算的一些结果示例:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录