<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000099" bgcolor="#FFFFFF">
On 24-07-14 16:21, Glynn Clements wrote:<br>
<blockquote
cite="mid:21457.5725.934003.182042@cerise.gclements.plus.com"
type="cite">
<pre wrap="">
Paulo van Breugel wrote:
</pre>
<blockquote type="cite">
<pre wrap="">How do I use this new flag / seed parameter for r.mapcalc in python
scripts?
</pre>
</blockquote>
<pre wrap="">
The grass.script.mapcalc() function has been updated to accept a seed=
parameter, which should be either an integer or the string 'auto' for
a random seed.
</pre>
</blockquote>
Hi, after updating to the latest version, I tried:<br>
<pre>
grass.script.mapcalc("$tmp_map = rand(${minval},${maxval})",
seed='auto',
minval = minval,
maxval = maxval,
tmp_map = tmp_map)
grass.script.mapcalc("$tmp_map = rand(${minval},${maxval})",
seed=1,
minval = minval,
maxval = maxval,
tmp_map = tmp_map)</pre>
<br>
In both cases I get the error.<br>
<pre>ERROR: Pseudo-random number generator not seeded</pre>
Any idea what am I doing wrong here?<br>
<br>
<br>
</body>
</html>