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

Deprecated argument for np.histogram2d #318

Open
davidcato opened this issue Mar 20, 2023 · 3 comments
Open

Deprecated argument for np.histogram2d #318

davidcato opened this issue Mar 20, 2023 · 3 comments
Labels
python-related version issue Any version issues for python, numpy, scipy, matplotlib, etc

Comments

@davidcato
Copy link

Hi all,

I just want to heads up that the latest version of numpy (1.24) does not support normed as an argument anymore. Thus, trying to analyze a chain under this version of numpy will result in the following error:

TypeError: histogram2d() got an unexpected keyword argument 'normed'

According to the official documentation normed has been deprecated since version 1.6.0. and its use should be substitute by the density argument.

@brinckmann
Copy link
Owner

Thanks for the report and for including the solution!

Best,
Thejs

@brinckmann brinckmann added the python-related version issue Any version issues for python, numpy, scipy, matplotlib, etc label Mar 21, 2023
@brinckmann
Copy link
Owner

Mostly note to self: I like to preserve backwards compatibility (unlike Python developers) since a lot of people have old versions on clusters, but it looks like the default prior to the change was normed=False, which is what is set in the code, so the flag should be possible to omit entirely. We can leave density=False (although density=None is already the default) so a user interested in modifying the code realizes it's an option.

Best,
Thejs

@brinckmann
Copy link
Owner

This was missed for the previous release but has been fixed for the next version. Since numpy v1.5 and earlier is very old I decided to only keep the density flag and left a comment in the code in case anyone is stuck on an old version and encounter the issue.

Best,
Thejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python-related version issue Any version issues for python, numpy, scipy, matplotlib, etc
Projects
None yet
Development

No branches or pull requests

2 participants