Skip to content

Commit

Permalink
docs, changelog for #1465
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Jul 3, 2024
1 parent 2a09a27 commit 4f0f0e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Release Date: TBD
- Allows structural equations in model files to be provided in string form [#1427](https://github.com/econ-ark/HARK/pull/1427)
- Introduces `HARK.parser' module for parsing configuration files into models [#1427](https://github.com/econ-ark/HARK/pull/1427)
- Allows construction of shocks with arguments based on mathematical expressions [#1464](https://github.com/econ-ark/HARK/pull/1464)
- YAML configuration file for the normalized consumption and portolio choice [#1465](https://github.com/econ-ark/HARK/pull/1465)

#### Minor Changes

Expand Down
8 changes: 4 additions & 4 deletions HARK/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def math_text_to_lambda(text):


def harklang_loader():
"""Add constructors to PyYAML loader."""
"""
A PyYAML loader that supports tags for HARKLang,
such as random variables and model tags.
"""
loader = yaml.SafeLoader
yaml.SafeLoader.add_constructor(
"!Bernoulli", tuple_constructor_from_class(Bernoulli)
Expand All @@ -62,6 +65,3 @@ def harklang_loader():
)

return loader


########################################################################

0 comments on commit 4f0f0e3

Please sign in to comment.