@@ -267,7 +267,6 @@ def _get_machar(ftype):
267
267
268
268
typedef int (PyArray_SortFunc)(void *, npy_intp, void *);
269
269
typedef int (PyArray_ArgSortFunc)(void *, npy_intp *, npy_intp, void *);
270
-
271
270
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
272
271
index f837df1..d3ce70d 100644
273
272
--- a/numpy/core/setup_common.py
@@ -283,6 +282,25 @@ def _get_machar(ftype):
283
282
src, obj = cmd._compile(body, None, None, 'c')
284
283
cmd.temp_files.append("_configtest")
285
284
cmd.compiler.link_executable([obj], "_configtest")
285
+ diff --git a/numpy/core/src/multiarray/alloc.c b/numpy/core/src/multiarray/alloc.c
286
+ index 6755095..e2fbae6 100644
287
+ --- a/numpy/core/src/multiarray/alloc.c
288
+ +++ b/numpy/core/src/multiarray/alloc.c
289
+ @@ -74,14 +74,6 @@ _npy_alloc_cache(npy_uintp nelem, npy_uintp esz, npy_uint msz,
290
+ #ifdef _PyPyGC_AddMemoryPressure
291
+ _PyPyPyGC_AddMemoryPressure(nelem * esz);
292
+ #endif
293
+ -#ifdef HAVE_MADV_HUGEPAGE
294
+ - /* allow kernel allocating huge pages for large arrays */
295
+ - if (NPY_UNLIKELY(nelem * esz >= ((1u<<22u)))) {
296
+ - npy_uintp offset = 4096u - (npy_uintp)p % (4096u);
297
+ - npy_uintp length = nelem * esz - offset;
298
+ - madvise((void*)((npy_uintp)p + offset), length, MADV_HUGEPAGE);
299
+ - }
300
+ -#endif
301
+ }
302
+ return p;
303
+ }
286
304
diff --git a/numpy/core/src/multiarray/typeinfo.c b/numpy/core/src/multiarray/typeinfo.c
287
305
index 14c4f27..c5a72b1 100644
288
306
--- a/numpy/core/src/multiarray/typeinfo.c
@@ -844,7 +862,6 @@ def _get_machar(ftype):
844
862
845
863
diff --git a/numpy/linalg/setup.py b/numpy/linalg/setup.py
846
864
index 66c07c9..847116f 100644
847
-
848
865
--- a/numpy/linalg/setup.py
849
866
+++ b/numpy/linalg/setup.py
850
867
@@ -29,6 +29,7 @@ def configuration(parent_package='', top_path=None):
@@ -911,19 +928,6 @@ def get_lapack_lite_sources(ext, build_dir):
911
928
'console_scripts': f2py_cmds
912
929
},
913
930
914
- diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c
915
- index 30820737e..d8a350f0d 100644
916
- --- a/numpy/core/src/multiarray/shape.c
917
- +++ b/numpy/core/src/multiarray/shape.c
918
- @@ -94,3 +94,4 @@ PyArray_Resize(PyArrayObject *self, PyArray_Dims *newshape, int refcheck,
919
- "Use the np.resize function or refcheck=False");
920
- - return NULL;
921
- + PyErr_Clear();
922
- + refcnt = 1;
923
- #else
924
- refcnt = PyArray_REFCOUNT(self);
925
- #endif /* PYPY_VERSION */
926
-
927
931
'''
928
932
install_from_pypi ("numpy==1.16.4" , patch = patch , env = {"NPY_NUM_BUILD_JOBS" : "1" })
929
933
0 commit comments