[Numpy-tickets] [NumPy] #750: Swig interface - Bug in FORTRAN-ordering support

NumPy numpy-tickets@scipy....
Mon Apr 21 23:23:05 CDT 2008

#750: Swig interface - Bug in FORTRAN-ordering support
 Reporter:  kishorg  |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  high     |   Milestone:          
Component:  Other    |     Version:  devel   
 Severity:  blocker  |    Keywords:          
 I am applying following typemap for passing address of a Fortran style
 Numpy matrix to C++ function using Swig.

 %apply (double* IN_FARRAY2, int DIM1,int DIM2) {(double *ptr_in, index_t
 n_rows_in, index_t n_cols_in)};

 I always get C-style ordered array in my C++ code with a new copy of Numpy

 The problem is typemap definition for IN_FARRAY2 in numpy.i at line number
 713 calls function

 array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,

 which copies it into new C-Style array. If I replace this call with

 array = obj_to_array_no_conversion($input, DATA_TYPECODE);

 then it works correctly. This is a bug in Numpy.i and need to fix it.

Ticket URL: <http://scipy.org/scipy/numpy/ticket/750>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list