Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
ffde2c83
Commit
ffde2c83
authored
3 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
fix doc comments
parent
da6cb8a7
No related branches found
No related tags found
1 merge request
!481
Introduce immutable RNG state for correct comparisons and pickling
Pipeline
#80327
passed
3 months ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pystencils/sympyextensions/random.py
+3
-2
3 additions, 2 deletions
src/pystencils/sympyextensions/random.py
with
3 additions
and
2 deletions
src/pystencils/sympyextensions/random.py
+
3
−
2
View file @
ffde2c83
...
@@ -14,7 +14,7 @@ from ..types import UserTypeSpec, create_type, PsIeeeFloatType, PsNamedArrayType
...
@@ -14,7 +14,7 @@ from ..types import UserTypeSpec, create_type, PsIeeeFloatType, PsNamedArrayType
class
RngState
(
ABC
):
class
RngState
(
ABC
):
"""
State of an RNG object.
"""
State of an RNG object.
Instances of `RngState
Base
` must be immutable, hashable, and comparable
Instances of `RngState` must be immutable, hashable, and comparable
to facilitate comparison, hashing, and pickle serialization of RNG invocation expressions.
to facilitate comparison, hashing, and pickle serialization of RNG invocation expressions.
"""
"""
...
@@ -107,7 +107,8 @@ class RngBase(ABC):
...
@@ -107,7 +107,8 @@ class RngBase(ABC):
"""
Get a symbolic invocation of the RNG and a symbol representing its result.
"""
Get a symbolic invocation of the RNG and a symbol representing its result.
Args:
Args:
counter: An expression specifying the external counter part of the RNG state, optional
counter: An expression specifying the external counter part of the RNG state,
e.g. the time step counter
"""
"""
rng_func
,
state
=
self
.
_get_rng_func
()
rng_func
,
state
=
self
.
_get_rng_func
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment