Skip to content

Commit

Permalink
Add more information about random numbers (cf NeuralEnsemble#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Mar 14, 2019
1 parent f5fa4e8 commit bff3aff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class MockNESTModule(mock.Mock):
# General information about the project.
project = u'PyNN'
authors = u'the PyNN community'
copyright = u'2006-2017, ' + authors
copyright = u'2006-2019, ' + authors

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -80,7 +80,7 @@ class MockNESTModule(mock.Mock):
# The short X.Y version.
version = '0.9'
# The full version, including alpha/beta/rc tags.
release = '0.9.3'
release = '0.9.4.dev'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
15 changes: 15 additions & 0 deletions doc/random_numbers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ simulation. This independence can be computationally costly, however, so it is
possible to set *parallel_safe=False*, accepting that the results will be
dependent on the number of nodes, in order to get better performace.

.. note:: if you do not provide a seed, PyNN will provide one for you, the
same each time. This means that running the same simulation several
times will use identical random numbers each time, so if you want
to have different random numbers on different runs, you must
provide your own seed and change it (or randomly generate it)
each time.

.. note:: *parallel_safe* may or may not have any effect when using
a :class:`~pyNN.random.NativeRNG`, depending on the simulator.

Expand Down Expand Up @@ -135,4 +142,12 @@ arguments returns a single number, not an array:
digits but the numbers in the array have full precision.


SpikeSourcePoisson
==================

The :class:`SpikeSourcePoisson` model is currently an exception to the situation outlined above.
It ought to take an `rng` argument, but at present this is not supported, and the model uses the
global random number generator seed, as set in the :func:`setup()` function.


.. _`GNU Scientific Library random number generators`: http://pygsl.sourceforge.net/reference/pygsl/module-pygsl.rng.html

0 comments on commit bff3aff

Please sign in to comment.