I tried python-mode, it seems that it can work when I press K on "numpy.array", but if I want to press K on "np.array", it won't work.
Try using the jedi-vim plugin. It uses Jedi to get completions and is much better at doing so than python-rope is. It will resolve
numpy.array and show the appropriate documentation in a tab/split. Be warned that numpy is notoriously slow for Jedi to resolve when it's not cached.
zondo's suggestion to use
:!pydoc numpy.array does work, but I find it annoying because I can't use Vim mappings to navigate the output, yank text from it, or leave it open for reference. There's also the issue of using a virutalenv, which may not have
pydoc in the virtualenv's
$PATH. In that case, you would have to use:
:!python -m pydoc numpy.array.