-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d46529d
commit 8c5b0ca
Showing
11 changed files
with
112 additions
and
56 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Author: Nicolas Legrand <[email protected]> | ||
|
||
import numpy as np | ||
from rshgf import Network as RsNetwork | ||
|
||
from pyhgf import load_data | ||
|
@@ -13,12 +14,20 @@ def test_1d_gaussain(): | |
# Rust ----------------------------------------------------------------------------- | ||
rs_network = RsNetwork() | ||
rs_network.add_nodes(kind="exponential-state") | ||
rs_network.inputs | ||
rs_network.edges | ||
rs_network.set_update_sequence() | ||
|
||
rs_network.input_data(timeseries) | ||
|
||
# Python --------------------------------------------------------------------------- | ||
py_network = PyNetwork().add_nodes(kind="exponential-state") | ||
py_network.attributes | ||
py_network.input_data(timeseries) | ||
|
||
# Ensure identical results | ||
assert np.isclose( | ||
py_network.node_trajectories[0]["xis"], rs_network.node_trajectories[0]["xis"] | ||
).all() | ||
assert np.isclose( | ||
py_network.node_trajectories[0]["mean"], rs_network.node_trajectories[0]["mean"] | ||
).all() | ||
assert np.isclose( | ||
py_network.node_trajectories[0]["nus"], rs_network.node_trajectories[0]["nus"] | ||
).all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters