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

small change to eliminate obsolete np.int calls #738

Merged
merged 10 commits into from
Sep 18, 2023
Merged

Conversation

vjcitn
Copy link
Contributor

@vjcitn vjcitn commented Sep 17, 2023

Many thanks for contributing to sfaira!

PR Checklist
Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs).

  • [ x] This comment contains a description of changes (with reason)
  • Referenced issue is linked
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated
  • docs/release-notes.rst is updated

Description of changes

Please ignore the 'note.fork' file in the PR.

np.int is defunct in recent numpy. We run into

> ui$predict_all() 
Error in eval(ei, envir) : 
  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

The changes proposed convert two occurrences of np.int to int and
this permits the function to compute with numpy 1.21.5.

@le-ander le-ander changed the base branch from main to dev September 18, 2023 07:49
@le-ander
Copy link
Member

Thanks a lot!

@le-ander le-ander merged commit 55e1106 into theislab:dev Sep 18, 2023
7 of 9 checks passed
@vjcitn
Copy link
Contributor Author

vjcitn commented Sep 30, 2023

will there be a new release with this repair?

@le-ander
Copy link
Member

Sorry for the delay. Everything is now merged into main and a new release was created. This should be available via pypi in the next days. You can already get it now using pip install git+https://github.com/theislab/sfaira.git

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

Successfully merging this pull request may close these issues.

3 participants