numpy.lookfor(what, module=None, import_modules=True, regenerate=False, output=None)[source]

Do a keyword search on docstrings.

A list of objects that matched the search is displayed, sorted by relevance. All given keywords need to be found in the docstring for it to be returned as a result, but the order does not matter.


String containing words to look for.

modulestr or list, optional

Name of module(s) whose docstrings to go through.

import_modulesbool, optional

Whether to import sub-modules in packages. Default is True.

regeneratebool, optional

Whether to re-generate the docstring cache. Default is False.

outputfile-like, optional

File-like object to write the output to. If omitted, use a pager.

See also

source, info


Relevance is determined only roughly, by checking if the keywords occur in the function name, at the start of a docstring, etc.


>>> np.lookfor('binary representation') 
Search results for 'binary representation'
    Return the binary representation of the input number as a string.
    Given a binary dump as given by GNU od -b, look for long double
    Return a string representation of a number in the given base system.