python-jedi

How to get the types of numpy function arguments (from docstrings) using jedi in python

◇◆丶佛笑我妖孽 提交于 2021-02-11 09:40:58
问题 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

How to get the types of numpy function arguments (from docstrings) using jedi in python

≯℡__Kan透↙ 提交于 2021-02-11 09:39:13
问题 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

Vim supertab and jedi-vim

怎甘沉沦 提交于 2019-12-23 10:56:35
问题 Posting as a follow up to How to check if SuperTab and jedi-vim is activated? and have done what Ingo Karkat proposed. Now I wonder what is broken and how I fix it. Here is the output: :verbose imap <tab> i <Tab> <Plug>SuperTabForward Last set from ~/.vim/bundle/supertab/plugin/supertab.vim Which looks allright to me, and... :scriptnames 1: /etc/vimrc 2: /usr/share/vim/vim72/syntax/syntax.vim 3: /usr/share/vim/vim72/syntax/synload.vim 4: /usr/share/vim/vim72/syntax/syncolor.vim 5: /usr/share

emacs-jedi does not find numpy completions

点点圈 提交于 2019-12-20 10:44:49
问题 I installed emacs-jedi to get some code completion for python in emacs. In general, I must say that I am very impressed! It works well out of the box and finds completions quickly for built -in libraries. However, I use python for scientific purposes and rely on numpy and scipy for my work. For some reason, I get no completions for these modules. Example: import numpy testVector = numpy.array([1,2,3]) now typing testVector. and waiting, nothing shows up 回答1: I wonder why it does not work. It

emacs-jedi does not find numpy completions

时光怂恿深爱的人放手 提交于 2019-12-03 00:15:35
I installed emacs-jedi to get some code completion for python in emacs. In general, I must say that I am very impressed! It works well out of the box and finds completions quickly for built -in libraries. However, I use python for scientific purposes and rely on numpy and scipy for my work. For some reason, I get no completions for these modules. Example: import numpy testVector = numpy.array([1,2,3]) now typing testVector. and waiting, nothing shows up I wonder why it does not work. It looks like sys.path problem but it should work without any configuration. But here is some idea for a brute