當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


Python numpy.lookfor()用法及代碼示例


借助numpy.lookfor()方法,我們可以通過使用numpy獲取有關模塊的信息numpy.lookfor()方法。

用法: numpy.lookfor(module_name)
返回:Return the information about the module.

範例1:
在這個例子中,我們可以通過使用numpy.lookfor()方法,我們能夠獲取有關模塊的信息。


# import numpy 
import numpy as np 
  
# using numpy.lookfor() method 
print(np.lookfor("isin"))

輸出:

Search results for ‘isin’
————————-
numpy.isinf
Test element-wise for positive or negative infinity.
numpy.compat.is_pathlib_path
Check whether obj is a pathlib.Path object.
numpy.isin
Calculates `element in test_elements`, broadcasting over `element` only.

範例2:

# import numpy 
import numpy as np 
  
# using numpy.lookfor() method 
print(np.lookfor("isdigit"))

輸出:

Search results for ‘isdigit’
————————-
numpy.bytes0.isdigit
B.isdigit() -> bool
numpy.str0.isdigit
S.isdigit() -> bool
numpy.chararray
chararray(shape, itemsize=1, unicode=False, buffer=None, offset=0,
numpy.char.isdigit
Returns true for each element if all characters in the string are
numpy.chararray.isdigit
Returns true for each element if all characters in the string are
None



相關用法


注:本文由純淨天空篩選整理自Jitender_1998大神的英文原創作品 Python | numpy.lookfor() method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。