diff --git a/python/extrules.am b/python/extrules.am index 543cc4b5a..a62a96f9f 100644 --- a/python/extrules.am +++ b/python/extrules.am @@ -1,5 +1,5 @@ swig : gribapi_swig.i - swig -python -module gribapi_swig -DNUMPY -o swig_wrap_numpy.c gribapi_swig.i + swig -python -module gribapi_swig -o swig_wrap_numpy.c gribapi_swig.i cp gribapi_swig.py swig_wrap_numpy.py # swig -python -module gribapi_swig -o swig_wrap_array.c gribapi_swig.i diff --git a/python/gribapi_swig.i b/python/gribapi_swig.i index 7940427ff..9d13c362a 100644 --- a/python/gribapi_swig.i +++ b/python/gribapi_swig.i @@ -140,6 +140,7 @@ int grib_c_set_key_vals(int* gid, char* keyvals); int grib_c_is_missing(int* gid, char* key, int* OUTPUT); int grib_c_is_defined(int* gid, char* key, int* OUTPUT); +// Numpy Support %apply (double* IN_ARRAY1, int DIM1) {(double* dpin_val, int dpin_val_dim1)}; %apply (long* IN_ARRAY1, int DIM1) {(long* lpin_val, int lpin_val_dim1)}; %apply (int* IN_ARRAY1, int DIM1) {(int* ipin_index, int ipin_index_dim1)};