<div dir="ltr">Hi,<div><br></div><div>In GRASS 7 (RC1) python it is possible to export a raster map to an array </div><div>which can be used e.g. by Numpy.</div><div><br></div><div>For example:</div><div><br></div><div>import grass.script.array as garray</div><div><div>x1 = garray.array()</div><div>x1.read("my_raster")</div></div><div><br></div><div>It seems that this creates a temporary file in the .tmp folder of the respective</div><div>location. I am not sure if this has been existing before, but these temporary</div><div>files are not deleted after e.g. x1 is not used anymore (i.e. the calculation of </div><div>the script finished). So do I need to manually (in the python script) close that x1 so</div><div>that the associated temporary file gets deleted (and if yes how?)? Otherwise</div><div>when using this procedure to do numpy calculations in loops the tmp-files</div><div>pile up quite fast.</div><div><br></div><div>Of course I can empty the tmp folder after every loop, but I am not sure</div><div>if this is really the right way.</div><div><br></div><div>Any suggestions?</div><div><br></div><div>/Johannes</div></div>