-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Remove from numpy cimport * #17521
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
Remove from numpy cimport * #17521
Changes from 1 commit
1c241e7
2d8ccb5
f4c987a
6a8e86f
8fb5e44
e2f921d
25520a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# cython: profile=False | ||
|
||
from numpy cimport * | ||
cimport numpy as np | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we're inconsistent about this, but at least I prefer the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coming right up. |
||
import numpy as np | ||
|
||
cimport cython | ||
|
||
import_array() | ||
np.import_array() | ||
|
||
cimport util | ||
|
||
from numpy cimport (int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, | ||
from numpy cimport (ndarray, | ||
double_t, | ||
int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, | ||
uint32_t, uint64_t, float16_t, float32_t, float64_t) | ||
|
||
from libc.stdlib cimport malloc, free | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,19 @@ | ||
# cython: profile=False | ||
|
||
from numpy cimport * | ||
cimport numpy as np | ||
import numpy as np | ||
|
||
cimport cython | ||
from cython cimport Py_ssize_t | ||
|
||
import_array() | ||
np.import_array() | ||
|
||
cimport util | ||
|
||
from numpy cimport NPY_INT8 as NPY_int8 | ||
from numpy cimport NPY_INT16 as NPY_int16 | ||
from numpy cimport NPY_INT32 as NPY_int32 | ||
from numpy cimport NPY_INT64 as NPY_int64 | ||
from numpy cimport NPY_FLOAT16 as NPY_float16 | ||
from numpy cimport NPY_FLOAT32 as NPY_float32 | ||
from numpy cimport NPY_FLOAT64 as NPY_float64 | ||
|
||
from numpy cimport (int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, | ||
from numpy cimport (ndarray, | ||
int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
uint32_t, uint64_t, float16_t, float32_t, float64_t) | ||
|
||
int8 = np.dtype(np.int8) | ||
int16 = np.dtype(np.int16) | ||
int32 = np.dtype(np.int32) | ||
int64 = np.dtype(np.int64) | ||
float16 = np.dtype(np.float16) | ||
float32 = np.dtype(np.float32) | ||
float64 = np.dtype(np.float64) | ||
|
||
cdef double NaN = <double> np.NaN | ||
cdef double nan = NaN | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#cython=False | ||
from numpy cimport * | ||
import numpy as np | ||
|
||
from distutils.version import LooseVersion | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want
libc.math
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Just pushed a fix.