[GRASS-user] [more] issues with python scripts

Glynn Clements glynn at gclements.plus.com
Mon Jan 17 12:08:30 EST 2011


Carlos Grohmann wrote:

> just to add to the last email:
> 
> grray() isnot working.
> 
> this is what I get, with any raster:
> 
> >>> a = garray.array()
> >>> a
> array([[ 0.,  0.,  0., ...,  0.,  0.,  0.],
>        [ 0.,  0.,  0., ...,  0.,  0.,  0.],
>        [ 0.,  0.,  0., ...,  0.,  0.,  0.],
>        ...,
>        [ 0.,  0.,  0., ...,  0.,  0.,  0.],
>        [ 0.,  0.,  0., ...,  0.,  0.,  0.],
>        [ 0.,  0.,  0., ...,  0.,  0.,  0.]])
> >>> a.read("elevation.dem")
> Sorry, <f> is not a valid flag
> Sorry, <bytes> is not a valid parameter

This suggests that you're using 6.x.

The grass.array module won't work with 6.x, as it requires changes to
r.in.bin and r.out.bin which are only present in 7.0. It was
back-ported to 6.x by mistake, and should probably be removed.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list