summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-08-19 13:12:50 -0600
committerGitHub <noreply@github.com>2022-08-19 22:12:50 +0300
commit17d730ae32f5f60c9c2ca75d202b4e866debd686 (patch)
tree8f1b1b8cd623738274cfdbeb12a3c829711ce58e /numpy/core
parent555c07f71d779d59a0ea097f811442a6c1bb405c (diff)
downloadnumpy-17d730ae32f5f60c9c2ca75d202b4e866debd686.tar.gz
DEP: drop support for msvc<=1900 and Interix (#22139)
[ci skip] Co-authored-by: h-vetinari <h.vetinari@gmx.com>
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/include/numpy/npy_math.h12
-rw-r--r--numpy/core/setup.py8
-rw-r--r--numpy/core/src/common/npy_config.h6
3 files changed, 5 insertions, 21 deletions
diff --git a/numpy/core/include/numpy/npy_math.h b/numpy/core/include/numpy/npy_math.h
index 954c3d0e9..1f4cea613 100644
--- a/numpy/core/include/numpy/npy_math.h
+++ b/numpy/core/include/numpy/npy_math.h
@@ -219,11 +219,7 @@ double npy_spacing(double x);
#ifndef NPY_HAVE_DECL_ISNAN
#define npy_isnan(x) ((x) != (x))
#else
- #if defined(_MSC_VER) && (_MSC_VER < 1900)
- #define npy_isnan(x) _isnan((x))
- #else
- #define npy_isnan(x) isnan(x)
- #endif
+ #define npy_isnan(x) isnan(x)
#endif
#endif
@@ -250,11 +246,7 @@ double npy_spacing(double x);
#ifndef NPY_HAVE_DECL_ISINF
#define npy_isinf(x) (!npy_isfinite(x) && !npy_isnan(x))
#else
- #if defined(_MSC_VER) && (_MSC_VER < 1900)
- #define npy_isinf(x) (!_finite((x)) && !_isnan((x)))
- #else
- #define npy_isinf(x) isinf((x))
- #endif
+ #define npy_isinf(x) isinf((x))
#endif
#endif
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index cdf6117e6..9e05aded0 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -257,14 +257,6 @@ def check_complex(config, mathlibs):
priv = []
pub = []
- try:
- if os.uname()[0] == "Interix":
- warnings.warn("Disabling broken complex support. See #1365", stacklevel=2)
- return priv, pub
- except Exception:
- # os.uname not available on all platforms. blanket except ugly but safe
- pass
-
# Check for complex support
st = config.check_header('complex.h')
if st:
diff --git a/numpy/core/src/common/npy_config.h b/numpy/core/src/common/npy_config.h
index b01eca5ab..7457cc1b3 100644
--- a/numpy/core/src/common/npy_config.h
+++ b/numpy/core/src/common/npy_config.h
@@ -29,7 +29,7 @@
#endif
/* Disable broken MS math functions */
-#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32_VERSION)
+#if defined(__MINGW32_VERSION)
#undef HAVE_ATAN2
#undef HAVE_ATAN2F
@@ -41,7 +41,7 @@
#endif
-#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+#if defined(_MSC_VER)
#undef HAVE_CASIN
#undef HAVE_CASINF
@@ -71,7 +71,7 @@
#endif
/* MSVC _hypot messes with fp precision mode on 32-bit, see gh-9567 */
-#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(_WIN64)
+#if defined(_MSC_VER) && !defined(_WIN64)
#undef HAVE_CABS
#undef HAVE_CABSF