当前位置:网站首页>numpy. logical_ or
numpy. logical_ or
2022-06-24 10:18:00 【Wanderer001】
Reference resources numpy.logical_or - cloud + Community - Tencent cloud
numpy.logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_or'>
Compute the truth value of x1 OR x2 element-wise.
| Parameters: | x1, x2 : array_like Logical OR is applied to the elements of x1 and x2. If out : ndarray, None, or tuple of ndarray and None, optional A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs. where : array_like, optional This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default **kwargs For other keyword-only arguments, see the ufunc docs. |
|---|---|
| Returns: | y : ndarray or bool Boolean result of the logical OR operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars. |
See also
logical_and, logical_not, logical_xor, bitwise_or
Examples
>>> np.logical_or(True, False)
True
>>> np.logical_or([True, False], [False, False])
array([ True, False])
>>> x = np.arange(5)
>>> np.logical_or(x < 1, x > 3)
array([ True, False, False, False, True])边栏推荐
- 线程池的状态
- 415 binary tree (144. preorder traversal of binary tree, 145. postorder traversal of binary tree, 94. inorder traversal of binary tree)
- SQL sever基本数据类型详解
- How to manage massive network infrastructure?
- CVPR 2022 Oral | 英伟达提出自适应token的高效视觉Transformer网络A-ViT,不重要的token可以提前停止计算
- Machine learning perceptron and k-nearest neighbor
- Leetcode-1089: replication zero
- leetCode-498: 对角线遍历
- How to standardize data center infrastructure management process
- 整理接口性能优化技巧,干掉慢代码
猜你喜欢

1.项目环境搭建

uniapp开发微信小程序,显示地图功能,且点击后打开高德或腾讯地图。

Cookie encryption 4 RPC method determines cookie encryption

How to standardize data center infrastructure management process

美国电子烟巨头 Juul 遭遇灭顶之灾,所有产品强制下架

415-二叉树(144. 二叉树的前序遍历、145. 二叉树的后序遍历、94. 二叉树的中序遍历)

How to manage massive network infrastructure?

SQL Sever关于like操作符(包括字段数据自动填充空格问题)

Machine learning - principal component analysis (PCA)

6.套餐管理业务开发
随机推荐
整理接口性能优化技巧,干掉慢代码
leetCode-面试题 16.06: 最小差
线程的六种状态
leetCode-498: 对角线遍历
416-二叉树(前中后序遍历—迭代法)
415-二叉树(144. 二叉树的前序遍历、145. 二叉树的后序遍历、94. 二叉树的中序遍历)
微信小程序学习之 实现列表渲染和条件渲染.
小程序学习之获取用户信息(getUserProfile and getUserInfo)
2022-06-23:给定一个非负数组,任意选择数字,使累加和最大且为7的倍数,返回最大累加和。 n比较大,10的5次方。 来自美团。3.26笔试。
How to manage massive network infrastructure?
Leetcode-1089: replication zero
包装类型与基本类型的区别
leetCode-2221: 数组的三角和
Desktop software development framework reward
Geogebra instance clock
Array seamless scrolling demo
2021-08-17
web网站开发,图片懒加载
MySQL data advanced
411 stack and queue (20. valid parentheses, 1047. delete all adjacent duplicates in the string, 150. inverse Polish expression evaluation, 239. sliding window maximum, 347. the first k high-frequency