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

When using s(): AttributeError: module 'numpy' has no attribute 'int'. #343

Closed
olivermueller opened this issue Feb 8, 2024 · 3 comments · Fixed by #342
Closed

When using s(): AttributeError: module 'numpy' has no attribute 'int'. #343

olivermueller opened this issue Feb 8, 2024 · 3 comments · Fixed by #342
Labels

Comments

@olivermueller
Copy link

When I try to use a spline term through s(), I get the following error message:

AttributeError: module 'numpy' has no attribute 'int'.
np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

@dswah
Copy link
Owner

dswah commented Feb 8, 2024

i thought this was fixed in pygam v0.9.0!

which version of pygam are you using?
can you please run

pip freeze | grep pygam

(there is another bug in pygam v0.9.0, so if you do python -c 'import pygam;print(pygam.__version__)' it will print 0.8.0)

@dswah dswah added the bug label Feb 8, 2024
@olivermueller
Copy link
Author

Oh, seems like I am using 0.8.0. I just ran "pip install pygam" and did not check which version it installed. Because I'm running Python Python 3.12.1, it picked pygam 0.8.0.

@dswah
Copy link
Owner

dswah commented Feb 9, 2024

Ok! i will add python 3.12 to the build tests to ensure that it works. this will require publishing a new release...

in the mean time. if you can use and older version of python, like 3.11, then you can already install pygam v0.9.0

@dswah dswah linked a pull request Feb 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants