Hi Luca,
On Fri, Jan 8, 2016 at 10:18 AM, Luca Delucchi <[email protected]> wrote: >>>> for irow in xrange(elev.rows): > ... new[irow] = elev[irow] < 144 > ... > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'RasterSegment' object has no attribute 'rows' Thanks to discover this bad documentation page. instead of elev.rows it is possible to use len(elev) to get the number of rows, and insetad usig a variable to get the row number use just: {{{ for irow, row in enumerate(elev): new[irow] = row < 144 }}} > maybe there is a better solution, otherwise I can replace the wrong > code in the doc with this solution. please replace the example with enumerate. All the best Pietro _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
