Skip to content

Commit 037022b

Browse files
kartikmohtaBenno Evers
authored and
Benno Evers
committed
Fix build with python 3
1 parent a221563 commit 037022b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

matplotlibcpp.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,19 @@ namespace matplotlibcpp {
7272
}
7373

7474
private:
75+
#ifndef WITHOUT_NUMPY
7576
#if PY_MAJOR_VERSION >= 3
76-
int import_numpy() {
77+
void *import_numpy() {
7778
import_array(); // initialize C-API
79+
return NULL;
7880
}
7981
#else
8082
void import_numpy() {
8183
import_array(); // initialize C-API
8284
}
8385
#endif
86+
#endif
87+
8488
_interpreter() {
8589

8690
// optional but recommended

0 commit comments

Comments
 (0)