Move NumPy API initialization into libarrow_python

This commit is contained in:
Wes McKinney committed 2017-04-16 00:03:19 -04:00
1 parent 0a2d3874bd
commit 68e2d5b8d9
3 files changed
+6 -8

No files matched your search

+2
View File
@@ -47,6 +47,7 @@ set(ARROW_PYTHON_SRCS
common.cc
config.cc
helpers.cc
init.cc
io.cc
numpy_convert.cc
pandas_convert.cc
@@ -82,6 +83,7 @@ install(FILES
config.h
do_import_numpy.h
helpers.h
init.h
io.h
numpy_convert.h
numpy_interop.h
+2 -3
View File
@@ -19,14 +19,13 @@
#include <gtest/gtest.h>
#include "arrow/python/do_import_numpy.h"
#include "arrow/python/numpy_interop.h"
#include "arrow/python/init.h"
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
Py_Initialize();
arrow::py::import_numpy();
arrow::py::InitNumPy();
int ret = RUN_ALL_TESTS();
+2 -5
View File
@@ -14,17 +14,14 @@
# distutils: language = c++
# cython: embedsignature = True
cdef extern from 'arrow/python/do_import_numpy.h':
cdef extern from 'arrow/python/init.h':
pass
cdef extern from 'arrow/python/numpy_interop.h' namespace 'arrow::py':
int import_numpy()
cdef extern from 'arrow/python/config.h' namespace 'arrow::py':
void Init()
void set_numpy_nan(object o)
import_numpy()
InitNumPy()
Init()
import numpy as np