当前位置:网站首页>numpy.logical_or
numpy.logical_or
2022-06-24 09:40:00 【Wanderer001】
参考 numpy.logical_or - 云+社区 - 腾讯云
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])边栏推荐
猜你喜欢

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

js单例模式

About thinkphp5, use the model save() to update the data prompt method not exist:think\db\query- & gt; Error reporting solution

How to solve multi-channel customer communication problems in independent stations? This cross-border e-commerce plug-in must be known!

机器学习——感知机及K近邻

操作符详解

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

oracle池式连接请求超时问题排查步骤

小程序学习之获取用户信息(getUserProfile and getUserInfo)

有关二叉树 的基本操作
随机推荐
How to solve multi-channel customer communication problems in independent stations? This cross-border e-commerce plug-in must be known!
Wechat cloud hosting launch public beta: in the appointment of the publicity meeting
学习使用php实现无限极评论和无限极转二级评论解决方案
Error reading CSV (TSV) file
Why is JSX syntax so popular?
Recursive traversal of 414 binary tree
416 binary tree (first, middle and last order traversal iteration method)
Nvisual digital infrastructure operation management software platform
416-二叉树(前中后序遍历—迭代法)
解决微信小程序rich-text富文本标签内部图片宽高自适应的方法
观察者模式
SQL-统计连续N天登陆的用户
桌面软件开发框架大赏
被困英西中学的师生安全和食物有保障
SQL Server AVG函数取整问题
Cookie encryption 4 RPC method determines cookie encryption
LeetCode: 137. Number II that appears only once
机器学习——感知机及K近邻
Arbre binaire partie 1
保健品一物一码防窜货营销软件开发