[GRASS-dev] pygrass numpy object int and float data

Pietro peter.zamb at gmail.com
Thu Jun 27 02:26:58 PDT 2013

Hi Ivan,

On Thu, Jun 27, 2013 at 10:03 AM, Ivan Marchesini
<ivan.marchesini at gmail.com> wrote:
> Hi,
> I have a CELL (integer) layer.
> Do the numpy raster object is, by default, a float type?

yes, a numpy array is by default a float, you can open a map with
different type with:

rast.open(mode='w', mtype='CELL')

This should work, however I had some Segmentation Fault using
RasterNumpy and integer in the past and I'm not sure it is working at
the moment...
Let me know! :-)


More information about the grass-dev mailing list