How to find all occurrence of a function in a package?

Viewed 50

Say I want to print out all the functions (or methods) in Numpy that at least calls the numpy.lib.utils.who function once. What I expect is a list of strings that looks like this:

['numpy.ndarray.flatten', 'numpy.ma.MaskedArray.recordmask', 'numpy.reshape']

(just for an example, doesn't mean they actually call the numpy.lib.utils.who function)

Is there any way to do this efficiently?

0 Answers
Related