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

change to import numpy as np #38

Merged
merged 1 commit into from
Oct 20, 2023
Merged

change to import numpy as np #38

merged 1 commit into from
Oct 20, 2023

Conversation

JackTemaki
Copy link
Contributor

See #37 (comment)

We should have the numpy import consistent, and I would go with the established default of import numpy as np, although some of our other repos might have that still different.

@albertz
Copy link
Member

albertz commented Oct 12, 2023

I always preferred import numpy over import numpy as np, as it is more readable to me. It's also more consistent to import torch (but inconsistent to import tensorflow as tf, although you could argue that tensorflow is longer than torch, which has the same length as numpy).

(This is just my opinion. I see that the other argument of following more the official recommendation also makes a lot of sense. I don't really have such a strong opinion on this.)

Copy link
Contributor

@vieting vieting left a comment

Choose a reason for hiding this comment

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

I'd personally prefer import numpy as np as it is in line with what most other people do, see e.g. the NumPy start page.

@christophmluscher christophmluscher merged commit 8ee4ee0 into main Oct 20, 2023
2 checks passed
@christophmluscher christophmluscher deleted the nick-numpy-np branch October 20, 2023 07:35
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.

5 participants