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

style: Normalise numpy imports with import numpy as np #2693

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

echoix
Copy link
Contributor

@echoix echoix commented Feb 8, 2025

The convention when importing NumPy is to use import numpy as np. This PR makes it uniform across the project, especially in samples.

Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/

The convention when importing numpy is to use `import numpy as np`

Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/
@echoix
Copy link
Contributor Author

echoix commented Feb 8, 2025

After this, I have a branch based on this that handles the deprecated, then removed, numpy type aliases, that is needed amongst others, to support numpy 2 properly. That branch is fortunately limited to samples/floatcanvas.

@swt2c swt2c merged commit 0a4900d into wxWidgets:master Feb 9, 2025
13 checks passed
@echoix
Copy link
Contributor Author

echoix commented Feb 9, 2025

I'm preparing the follow-up PR now

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.

2 participants