numpy: np.logical_and/or/not (逻辑与/或/非)

np.logical_and (逻辑与)

Syntax

np.logical_and(x1, x2, *args, **kwargs)

Test

>>> np.logical_and(True, False)
False
>>> np.logical_and([True, False], [False, False])
array([False, False], dtype=bool)

>>> x = np.arange(5)
>>> np.logical_and(x>1, x<4)
array([False, False,  True,  True, False], dtype=bool)

np.logical_or (逻辑或)

Syntax

np.logical_or(x1, x2, *args, **kwargs)

Test

>>> np.logical_or(True, False)
True
>>> np.logical_or([True, False], [False, False])
array([ True, False], dtype=bool)

>>> x = np.arange(5)
>>> np.logical_or(x < 1, x > 3)
array([ True, False, False, False,  True], dtype=bool)

np.logical_not (逻辑非)

Syntax

logical_not(x, *args, **kwargs)

Test

>>> np.logical_not(3)
False
>>> np.logical_not([True, False, 0, 1])
array([False,  True,  True, False], dtype=bool)

>>> x = np.arange(5)
>>> np.logical_not(x<3)
array([False, False, False,  True,  True], dtype=bool)


  • 20
    点赞
  • 62
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
MiTeC System Information Component Suite The most complex system information probe in Delphi and FPC/Lazarus world. The cost of a site license with full source codes is currently 110 EUR. TMiTeC_SystemInfo gathers all following components to one for simple use TMiTeC_AD explores ActiveDirectory TMiTeC_APM provides informaton about Advanced Power Management TMiTeC_BT detects Bluetooth devices using Native Bluetooth Enumerator) TMiTeC_CPU provides detailed CPU information TMiTeC_Devices provides devices information like Windows Device Manager TMiTeC_Disk provides logical drive information TMiTeC_Display provides display adapter information TMiTeC_DMA provides direct memory acceess TMiTeC_DriveContent scans and saves specified drive content TMiTeC_Engines provides information about various installed engines TMiTeC_EventLog digs information from Windows EventLog TMiTeC_Firewall enumerates settings and rules from Windows Firewall, rule management functionality TMiTeC_Machine provides informaton about computer or virtual machine, BIOS, TPM etc. TMiTeC_Media provides media devices information TMiTeC_Memory provides memory information TMiTeC_Monitor provides all connected moitors information TMiTeC_MSProduct detects some Microsoft products installed and their product keys TMiTeC_MUS detects available Windows updates (MicrosoftUpdateSession) TMiTeC_Network provides network card info, TCP/IP ad Winsock config, installed protocols, clients and services. TMiTeC_OperatingSystem provides OS detailed information, Locale, Timezone, NT specific info, hotfixes, internet settings etc. TMiTeC_Printers detects installed printers and their properties TMiTeC_ProcessList collects list of running processes, services, drivers and windows and their properties TMiTeC_Security detects installed AntiViruses, AntiSpyware and Firewalls TMiTeC_SMBIOS reads SMBIOS information from memory TMiTeC_Software provides list of installed software TMiTeC_Startup provides list of applications that are starte

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值