mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 06:31:43 +02:00
strict int types for DIM1 and arrays
This commit is contained in:
parent
808adc7cd8
commit
ec7a39f6c2
@ -65,12 +65,15 @@
|
||||
import_array();
|
||||
%}
|
||||
|
||||
/* Typemaps below change the type of numpy array dimensions from int to int64_t */
|
||||
%numpy_typemaps(double, NPY_DOUBLE, int64_t)
|
||||
%numpy_typemaps(int32_t, NPY_INT, int64_t)
|
||||
/* Enable write|read_safe functions to convert numpy arrays from/to double arrays */
|
||||
%apply (double* ARGOUT_ARRAY1, int DIM1) {(double * const dset_out, const int64_t dim_out)};
|
||||
%apply (double* IN_ARRAY1, int DIM1) {(const double * dset_in, const int64_t dim_in)};
|
||||
%apply (double* ARGOUT_ARRAY1, int64_t DIM1) {(double * const dset_out, const int64_t dim_out)};
|
||||
%apply (double* IN_ARRAY1, int64_t DIM1) {(const double * dset_in, const int64_t dim_in)};
|
||||
/* Enable write|read_safe functions to convert numpy arrays from/to int32 arrays */
|
||||
%apply (int* ARGOUT_ARRAY1, int DIM1) {(int32_t * const dset_out, const int64_t dim_out)};
|
||||
%apply (int* IN_ARRAY1, int DIM1) {(const int32_t * dset_in, const int64_t dim_in)};
|
||||
%apply (int32_t* ARGOUT_ARRAY1, int64_t DIM1) {(int32_t * const dset_out, const int64_t dim_out)};
|
||||
%apply (int32_t* IN_ARRAY1, int64_t DIM1) {(const int32_t * dset_in, const int64_t dim_in)};
|
||||
|
||||
/* This tells SWIG to treat char ** dset_in pattern as a special case
|
||||
Enables access to trexio_[...]_write_dset_str set of functions directly, i.e.
|
||||
|
Loading…
Reference in New Issue
Block a user