Commit eae353f8 authored by Alois SCHLOEGL's avatar Alois SCHLOEGL

remove import_array/warp_array - not clear why this should be needed

parent 30146823
......@@ -43,17 +43,6 @@
#include "pystfio.h"
#if PY_MAJOR_VERSION >= 3
int wrap_array() {
import_array();
return 0;
}
#else
void wrap_array() {
import_array();
}
#endif
stfio::filetype gettype(const std::string& ftype) {
stfio::filetype stftype = stfio::none;
if (ftype == "cfs") {
......
......@@ -28,7 +28,6 @@ static int myErr = 0; // flag to save error state
%include "std_string.i"
%include "exception.i"
%init %{
import_array();
PyDateTime_IMPORT;
%}
......
......@@ -63,6 +63,7 @@
#endif
#ifdef WITH_PYTHON
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>
#endif
......@@ -78,30 +79,13 @@
#include "./../../libstfnum/fit.h"
#ifdef WITH_PYTHON
#define array_data(a) (((PyArrayObject *)a)->data)
#define array_data(a) (((PyArrayObject *)a))
#endif
std::vector< std::vector< Vector_double > > gMatrix;
std::vector< std::string > gNames;
double _figsize[] = {8.0,6.0};
#if PY_MAJOR_VERSION >= 3
int wrap_array() {
#ifdef WITH_PYTHON
import_array();
return 0;
#else
return 0;
#endif
}
#else
void wrap_array() {
#ifdef WITH_PYTHON
import_array();
#endif
}
#endif
void ShowExcept(const std::exception& e) {
wxString msg;
msg << wxT("Caught an exception in the python module:\n")
......@@ -203,7 +187,6 @@ std::string get_versionstring() {
#ifdef WITH_PYTHON
PyObject* get_trace(int trace, int channel) {
wrap_array();
if ( !check_doc() ) return NULL;
......@@ -1729,7 +1712,6 @@ PyObject* leastsq( int fselect, bool refresh ) {
#ifdef WITH_PYTHON
PyObject* get_fit( int trace, int channel ) {
wrap_array();
if ( !check_doc() ) return NULL;
......
......@@ -21,7 +21,6 @@ namespace std {
};
%init %{
import_array();
%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment