NumPy as np? #13178
ojo4f3
started this conversation in
Help: Best practices
NumPy as np?
#13178
Replies: 2 comments
-
The current cimport numpy as np
import numpy
Cython does let you use the same name for both |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is there a preference between
import numpy
vsimport numpy as np
?I've reviewed a number of files and have seen it both ways. For example
morphology.pxd
usescimport numpy as np
andmorphology.pyx
usesimport numpy
.The convention is to import it under the alias
np
. Does this matter and if so does it need to be consistent? Thanks for your feedback!Colton
Beta Was this translation helpful? Give feedback.
All reactions