<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000099" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 26-07-14 07:58, Paulo van Breugel
wrote:<br>
</div>
<blockquote cite="mid:53D34376.8050704@gmail.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
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>
</blockquote>
Sorry, please ignore my message. I did a completely clean install of
grass and now it works. Must have been some problem with old install
or I was just too early with updating last time.<br>
<br>
In short, thanks Glynn for implementing the random seed options,
great work!<br>
<br>
</body>
</html>