Skip to content

Commit 9113bf7

Browse files
committed
ENH: update to NPY_1_8_API_VERSION
1 parent 8206c36 commit 9113bf7

File tree

6 files changed

+30
-1
lines changed

6 files changed

+30
-1
lines changed

pandas/_libs/hashtable.pxd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
cdef extern from *:
2+
"""
3+
/* allow direct access to PyArrayObject_fields's members */
4+
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
5+
"""
6+
17
from khash cimport (kh_int64_t, kh_uint64_t, kh_float64_t, kh_pymap_t,
28
kh_str_t, uint64_t, int64_t, float64_t)
39
from numpy cimport ndarray

pandas/_libs/parsers.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ cdef extern from "Python.h":
2626
object PyUnicode_Decode(char *v, Py_ssize_t size, char *encoding,
2727
char *errors)
2828

29+
cdef extern from *:
30+
"""
31+
/* allow direct access to PyArrayObject_fields's members */
32+
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
33+
"""
2934

3035
import numpy as np
3136
cimport numpy as cnp

pandas/_libs/reduction.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ from cpython cimport Py_INCREF
77

88
from libc.stdlib cimport malloc, free
99

10+
cdef extern from *:
11+
"""
12+
/* allow direct access to PyArrayObject_fields's members */
13+
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
14+
"""
15+
1016
import numpy as np
1117
cimport numpy as cnp
1218
from numpy cimport (ndarray,

pandas/_libs/sparse.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import sys
44

55
cimport cython
66

7+
cdef extern from *:
8+
"""
9+
/* allow direct access to PyArrayObject_fields's members */
10+
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
11+
"""
12+
713
import numpy as np
814
cimport numpy as cnp
915
from numpy cimport (ndarray, uint8_t, int64_t, int32_t, int16_t, int8_t,

pandas/_libs/src/ujson/python/JSONtoObj.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Numeric decoder derived from from TCL library
4141
#include "py_defines.h"
4242
#define PY_ARRAY_UNIQUE_SYMBOL UJSON_NUMPY
4343
#define NO_IMPORT_ARRAY
44+
#define NPY_NO_DEPREACTED_API NPY_1_6_API_VERSION
4445
#include <numpy/arrayobject.h> // NOLINT(build/include_order)
4546
#include <ultrajson.h> // NOLINT(build/include_order)
4647

pandas/_libs/window.pyx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ from libcpp.deque cimport deque
77

88
from libc.stdlib cimport malloc, free
99

10+
cdef extern from *:
11+
"""
12+
/* allow direct access to PyArrayObject_fields's members */
13+
#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
14+
"""
15+
1016
import numpy as np
1117
cimport numpy as cnp
1218
from numpy cimport ndarray, double_t, int64_t, float64_t, float32_t
1319
cnp.import_array()
1420

15-
1621
cdef extern from "src/headers/cmath" namespace "std":
1722
bint isnan(double) nogil
1823
int signbit(double) nogil

0 commit comments

Comments
 (0)