Skip to content

Commit

Permalink
Multi-node, multi-class IPM example.
Browse files Browse the repository at this point in the history
Includes a prototype functional initializer system.
  • Loading branch information
Tyler Coles committed Feb 14, 2024
1 parent 645c1e9 commit da6c984
Show file tree
Hide file tree
Showing 2 changed files with 425 additions and 0 deletions.
418 changes: 418 additions & 0 deletions doc/devlog/2024-02-12.ipynb

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions epymorph/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ def call_all(*fs: Callable[[], Any]) -> None:
f()


def or_raise(value: T | None, message: str) -> T:
"""Enforce that the given value is not None, or else raise an exception."""
if value is None:
raise Exception(message)
return value


# collection utilities


Expand Down

0 comments on commit da6c984

Please sign in to comment.