当前位置:网站首页>numpy.logical_and()
numpy.logical_and()
2022-06-24 09:40:00 【Wanderer001】
参考 numpy.logical_and() - 云+社区 - 腾讯云
numpy.
logical_and
(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'logical_and'>
Compute the truth value of x1 AND x2 element-wise.
Parameters: | x1, x2 : array_like Input arrays. 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_or, logical_not, logical_xor, bitwise_and
Examples
>>> np.logical_and(True, False)
False
>>> np.logical_and([True, False], [False, False])
array([False, False])
>>> x = np.arange(5)
>>> np.logical_and(x>1, x<4)
array([False, False, True, True, False])
边栏推荐
- [Eureka registry]
- 编程题(持续更新)
- LeetCode: 240. Search 2D matrix II
- Phpstrom code formatting settings
- Get the QR code of wechat applet with parameters - and share the source code of modifying the QR code logo
- CVPR 2022 Oral | 英伟达提出自适应token的高效视觉Transformer网络A-ViT,不重要的token可以提前停止计算
- JS singleton mode
- canvas无限扫描js特效代码
- Thinkphp5 multi language switching project practice
- Wechat applet learning to achieve list rendering and conditional rendering
猜你喜欢
随机推荐
JS proxy mode
415-二叉树(144. 二叉树的前序遍历、145. 二叉树的后序遍历、94. 二叉树的中序遍历)
居家办公如何管理数据中心网络基础设施?
Binary tree part I
Tutorial (5.0) 08 Fortinet security architecture integration and fortixdr * fortiedr * Fortinet network security expert NSE 5
Open Oracle server under Linux to allow remote connection
涂鸦智能携多款重磅智能照明解决方案,亮相2022美国国际照明展
[Eureka registry]
NVIDIA's CVPR 2022 oral is on fire! 2D images become realistic 3D objects in seconds! Here comes the virtual jazz band!
PHP uses recursive and non recursive methods to create multi-level folders
有关二叉树 的基本操作
形状变化loader加载jsjs特效代码
Desktop software development framework reward
Error reading CSV (TSV) file
上升的气泡canvas破碎动画js特效
Why is JSX syntax so popular?
vim的使用
Development of anti fleeing marketing software for health products
桌面软件开发框架大赏
How do novices choose the grade of investment and financial products?