[SciPy-Dev] Error in scipy.ndimage documentation

Matthieu Brucher matthieu.brucher@gmail....
Fri Sep 10 12:18:04 CDT 2010


Hi,

The following function is referenced on the scipy.ndimage page
(http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html#ndimage-ccallbacks)
:

static int
_shift_function(int *output_coordinates, double* input_coordinates,
                int output_rank, int input_rank, void *callback_data)
{
  int ii;
  /* get the shift from the callback data pointer: */
  double shift = *(double*)callback_data;
  /* calculate the coordinates: */
  for(ii = 0; ii < irank; ii++)
    icoor[ii] = ocoor[ii] - shift;
  /* return OK status: */
  return 1;
}

It obviously cannot be compiled (irank ->  input_rank, icoor ->
input_coordinates, ocoor ->  output_coordinates)

Matthieu
-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher


More information about the SciPy-Dev mailing list