How to get the types of numpy function arguments (from docstrings) using jedi in python
问题 Ideally I would like a function which works as follows (for all kinds of numpy functions): parameter_types('np.random.binomial') and returns: {'a: 'int', 'b':'float', 'size':'int'} I understand that jedi has some support for extracting this information from docstrings, but I cannot make it work. Is it possible to get something like this using jedi? 回答1: As found in this answer, your best bet is to install numpydoc and its requirements. import numpydoc import numpy as np doc = numpydoc