Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elpy auto-completion of numpy missing classes/funcs in newer numpy versions #1991

Open
hossfard opened this issue Jul 1, 2022 · 1 comment

Comments

@hossfard
Copy link

hossfard commented Jul 1, 2022

Summary

Elpy auto-completion does not list many of the functions/classes in latest numpy versions. This issue seems to stem from numpy itself, but I am wondering if there is something in the implementation detail or configuration of elpy that can be adjusted to work around the internal changes in numpy.

Steps to reproduce

  1. Install the latest version of numpy (1.23.0 as of this writing)
pip install numpy==1.23.0
  1. Open a new file and try to auto complete numpy's array
import numpy as np
np.arr

provided completions are abs, all, any, ... (See screenshot below)

image

(Note: array is not listed, but it does actually still exist in numpy 1.23.0)

Downgrading numpy to version 1.21.4 works as expected:

image

My configuration

  • OS: OpenSUSE TW 20220619
  • Emacs: 28.1
  • Python: 3.10.5

Result of (elpy-config)

Emacs.............: 28.1
Elpy..............: 1.35.0
Virtualenv........: None
Interactive Python: python3 3.10.5 (/home/username/projects/elpy/_venv/bin/python3)
RPC virtualenv....: rpc-venv (/home/username/.emacs.d/elpy/rpc-venv)
 Python...........: python3 3.10.5 (/home/username/.emacs.d/elpy/rpc-venv/bin/python3)
 Jedi.............: 0.18.1
 Autopep8.........: 1.6.0
 Yapf.............: 0.32.0
 Black............: 22.3.0 (22.6.0 available)
Syntax checker....: Not found (flake8)

Elpy configuration in my init.el

(defun hf/python-mode-hook ()
  (require 'pyvenv)
  (elpy-enable)
  (setq elpy-rpc-python-command "python3")
  )
(setq elpy-rpc-maximum-buffer-age 60)

(add-hook 'python-mode-hook 'hf/python-mode-hook)
@rn2208
Copy link

rn2208 commented Oct 12, 2022

I have exactly the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants