<div dir="ltr">Hi,<br><div><br>output = raster.RasterSegment(rainfall[t-1])<br>output.open('w','FCELL')<br>for row in range(nrows):<br> for col in range(ncols):<br> print "-> ", col, row<br>
output[col, row] = 0.0<br>output.close()<br clear="all"><br><br></div><div>returns:<br>----------<br></div><div><br>-> 0 0<br>Traceback (most recent call last):<br> File "/home/user/idwt.py", line 93, in <module><br>
output[col, row] = 0.0<br> File "/usr/local/grass-7.0.svn/etc/python/grass/pygrass/raster/__init__.py", line 277, in __setitem__<br> return self.put(x, y, row)<br> File "/usr/local/grass-7.0.svn/etc/python/grass/pygrass/errors.py", line 42, in wrapper<br>
return method(self, *args, **kargs)<br> File "/usr/local/grass-7.0.svn/etc/python/grass/pygrass/raster/__init__.py", line 372, in put<br> libseg.segment_put(ctypes.byref(self.segment.cseg),<br>AttributeError: 'Segment' object has no attribute 'cseg'<br>
<br><br><br></div><div>Thanks,<br>Yann<br></div><div><br>-- <br>----
</div></div>