Hamish wrote: > > The argument must be a pointer, try > > > > G_is_null_value(byref(in_rast[col]), data_type) > > > > or > > in_val = in_rast[col] > > G_is_null_value(byref(in_val), data_type) > > no joy, both those come back with: > > if not G_is_null_value(byref(in_rast[col]), data_type): > TypeError: byref() argument must be a ctypes instance, not 'int'
import grass.lib.raster as rast ... in_val = rast.CELL(in_rast[col]) G_is_null_value(byref(in_val), data_type) ctypes automatically converts the result of an array acces to a Python type, while byref() requires a ctypes type. And pointer arithmetic still isn't implemented (i.e. there's no simple way to get a pointer to any element of an array other than the first). -- Glynn Clements <gl...@gclements.plus.com> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev