summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/include/numpy/npy_common.h10
-rw-r--r--numpy/core/setup.py6
2 files changed, 6 insertions, 10 deletions
diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h
index c8495db8e..d5f329b66 100644
--- a/numpy/core/include/numpy/npy_common.h
+++ b/numpy/core/include/numpy/npy_common.h
@@ -10,16 +10,6 @@
#include <npy_config.h>
#endif
-// compile time environment variables
-#ifndef NPY_RELAXED_STRIDES_CHECKING
- #define NPY_RELAXED_STRIDES_CHECKING 0
-#endif
-#ifndef NPY_RELAXED_STRIDES_DEBUG
- #define NPY_RELAXED_STRIDES_DEBUG 0
-#endif
-#ifndef NPY_USE_NEW_CASTINGIMPL
- #define NPY_USE_NEW_CASTINGIMPL 0
-#endif
/*
* using static inline modifiers when defining npy_math functions
* allows the compiler to make optimizations when possible
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index dfb26c9c1..b73e55eb6 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -468,14 +468,20 @@ def configuration(parent_package='',top_path=None):
# Use relaxed stride checking
if NPY_RELAXED_STRIDES_CHECKING:
moredefs.append(('NPY_RELAXED_STRIDES_CHECKING', 1))
+ else:
+ moredefs.append(('NPY_RELAXED_STRIDES_CHECKING', 0))
# Use bogus stride debug aid when relaxed strides are enabled
if NPY_RELAXED_STRIDES_DEBUG:
moredefs.append(('NPY_RELAXED_STRIDES_DEBUG', 1))
+ else:
+ moredefs.append(('NPY_RELAXED_STRIDES_DEBUG', 0))
# Use the new experimental casting implementation in NumPy 1.20:
if NPY_USE_NEW_CASTINGIMPL:
moredefs.append(('NPY_USE_NEW_CASTINGIMPL', 1))
+ else:
+ moredefs.append(('NPY_USE_NEW_CASTINGIMPL', 0))
# Get long double representation
rep = check_long_double_representation(config_cmd)