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

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
1

cheers

carlos

--
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano
http://lattes.cnpq.br/5846052449613692
Linux User #89721
________________
Can’t stop the signal.

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@gclements.plus.com>

2011/1/17 Glynn Clements <glynn@gclements.plus.com>:

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.

right, done in r45066.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Mon, Jan 17, 2011 at 6:08 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Carlos Grohmann wrote:

...

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.

But cannot we backport instead the r.in.bin and r.out.bin changes? To
keep array in GRASS 6?

Markus