FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MAINT: Make `numpy.fft.helper` private by mtsokol · Pull Request #24945 · numpy/numpy · GitHub

/ numpy Public

MAINT: Make numpy.fft.helper private - #24945

Merged
ngoldbaum merged 2 commits into
numpy:mainfrom
mtsokol:fft-helper-private
Oct 19, 2023
Merged

ngoldbaum merged 2 commits into
numpy:mainfrom
mtsokol:fft-helper-private

Conversation

mtsokol commented Oct 18, 2023

Copy link
Copy Markdown
Member

Hi @rgommers @ngoldbaum,

I started working on post-core-rename items to finalize NEP 52 (one thing is making sure with a test that each function is available from one place only).

In this PR I make numpy.fft.helper private (now numpy.fft._helper) as it defines four public functions that are already available from numpy.fft.
I think that helper is used a bit, therefore I left a stub that raises a warning on access. If you would like a more strict approach here (only an AttributeError) let me know!

ngoldbaum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Just one super minor comment, other than that this looks good to me.

Comment thread numpy/lib/__init__.py

from .arrayterator import Arrayterator
from ._version import *
from .introspect import *

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I just double-checked, there's no need to modify __getattr__ below since np.lib.opt_func_info hasn't made it into a release yet.

Comment thread numpy/fft/__init__.py Outdated

from . import _pocketfft, helper
from . import _pocketfft, _helper
from . import helper # TODO: to be deleted once people move to `np.fft`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This comment should say it's deprecated in Numpy 2.0, following similar comments in the codebase so it's greppable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure! I updated the comment.

mtsokol force-pushed the fft-helper-private branch from 35c8d7e to 81c0c8b Compare October 19, 2023 10:19

Copy link
Copy Markdown
Member

Thanks @mtsokol!

ngoldbaum merged commit acae28b into numpy:main Oct 19, 2023
mtsokol deleted the fft-helper-private branch October 19, 2023 16:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL