Python | numpy.lookfor () method

NumPy | Python Methods and Functions

Using the numpy.lookfor() method, we can get information about a module in numpy using numpy.lookfor () .

Syntax: numpy.lookfor (module_name)
Return: Return the information about the module.

Example # 1:
In this example we see that with numpy.lookfor () we can get information about the module.

Exit:

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.

Example # 2:

# NumPy import

import numpy as np

 
# using the numpy method .lookfor ()

print (np.lookfor ( " isin " ))

# NumPy import

import numpy as np

 
# using the numpy.lookfor () method

print (np.lookfor ( "isdigit" ))

Output:

Search results for `isdigit`
————————-
numpy.bytes0.isdigit
B.isdigit () - & gt; bool
numpy.str0.isdigit
S.isdigit () - & gt; 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





Get Solution for free from DataCamp guru