Swig typemaps for inplace fortran arrays

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Swig typemaps for inplace fortran arrays

mcfarljm

Hi,

 

In numpy.i, I’m looking at the typemaps for inplace Fortran arrays, for example:

Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)

 

The typemap code (e.g. line 1579) uses the require_contiguous function for error checking, but I think maybe this is supposed to be require_c_or_f_contiguous?  Otherwise, if the provided numpy array is in Fortran order, it will fail require_contiguous and generate a TypeError.  (For what it’s worth, I pulled down the latest numpy.i from github and was doing some testing with numpy 1.13.3 under Python 2.7.16.)

 

Thanks,

John


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion