threadlepy 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {threadlepy-0.1.3 → threadlepy-0.1.4}/CHANGELOG.md +4 -0
- {threadlepy-0.1.3/src/threadlepy.egg-info → threadlepy-0.1.4}/PKG-INFO +1 -1
- {threadlepy-0.1.3 → threadlepy-0.1.4}/pyproject.toml +1 -1
- {threadlepy-0.1.3 → threadlepy-0.1.4}/scripts/test_all_commands_example_data.py +19 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/__init__.py +1 -1
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/commands.py +9 -2
- {threadlepy-0.1.3 → threadlepy-0.1.4/src/threadlepy.egg-info}/PKG-INFO +1 -1
- {threadlepy-0.1.3 → threadlepy-0.1.4}/LICENSE +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/MANIFEST.in +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/README.md +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/docs/threadlepy_tutorial.ipynb +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/scripts/test_commands.py +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/scripts/test_session.py +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/setup.cfg +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/Scripts/create.txt +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/dscw.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/dscw_nodeset.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/lazega.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/lazega_female.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/lazega_female_nodeset.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/lazega_nodes.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/mynet.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/mynet_nodesetfile.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/Examples/mynodes.tsv +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/client.py +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy/py.typed +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy.egg-info/SOURCES.txt +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy.egg-info/dependency_links.txt +0 -0
- {threadlepy-0.1.3 → threadlepy-0.1.4}/src/threadlepy.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
- Added the `return_histograms` option to `rwfpt()` / `th_rwfpt()` to match the current threadleR wrapper.
|
|
6
|
+
|
|
3
7
|
## 0.1.3
|
|
4
8
|
|
|
5
9
|
- Aligned `load_examples()` with threadleR behavior by assigning example handles by default and restoring the previous Threadle working directory after loading.
|
|
@@ -253,6 +253,25 @@ def run(threadle_path: str | None = None, *, timeout: float = 1800.0) -> int:
|
|
|
253
253
|
)
|
|
254
254
|
show("info rw distances", lambda: th.info(rw_distances))
|
|
255
255
|
show("info rw fpt", lambda: th.info(rw_fpt))
|
|
256
|
+
rw_fpt_hist = show(
|
|
257
|
+
"rw fpt with histograms",
|
|
258
|
+
lambda: th.rwfpt(
|
|
259
|
+
"rw_fpt_hist",
|
|
260
|
+
walk_net,
|
|
261
|
+
attrname="group",
|
|
262
|
+
maxsteps=30,
|
|
263
|
+
layernames="walk_layer",
|
|
264
|
+
walkfactor=0.5,
|
|
265
|
+
minpairobs=1,
|
|
266
|
+
balanced=False,
|
|
267
|
+
weighted=False,
|
|
268
|
+
return_histograms=True,
|
|
269
|
+
),
|
|
270
|
+
)
|
|
271
|
+
show(
|
|
272
|
+
"info rw fpt histogram network",
|
|
273
|
+
lambda: th.info(rw_fpt_hist["network"] if isinstance(rw_fpt_hist, dict) else rw_fpt_hist),
|
|
274
|
+
)
|
|
256
275
|
|
|
257
276
|
# Miscellaneous session helpers.
|
|
258
277
|
show("setting verbose false", lambda: th.setting("verbose", False))
|
|
@@ -735,14 +735,21 @@ def rwfpt(
|
|
|
735
735
|
minpairobs: int = 10,
|
|
736
736
|
balanced: bool = False,
|
|
737
737
|
weighted: bool = False,
|
|
738
|
+
return_histograms: bool = False,
|
|
738
739
|
layername: Optional[Union[str, list[str], tuple[str, ...]]] = None,
|
|
739
740
|
):
|
|
740
741
|
"""Estimate category mean first-passage times with random walks and return a result network handle."""
|
|
741
742
|
if layername is not None and not layernames:
|
|
742
743
|
layernames = layername
|
|
743
744
|
layernames = _collapse(layernames)
|
|
744
|
-
|
|
745
|
-
|
|
745
|
+
args = locals().copy()
|
|
746
|
+
if return_histograms:
|
|
747
|
+
args["returnhistograms"] = "true"
|
|
748
|
+
payload = call("rwfpt", args, assign=name, drop=("layername", "return_histograms"))
|
|
749
|
+
network_handle = _handle(name)
|
|
750
|
+
if return_histograms and payload is not None:
|
|
751
|
+
return {"network": network_handle, "histograms": payload}
|
|
752
|
+
return network_handle
|
|
746
753
|
|
|
747
754
|
|
|
748
755
|
def random_seed(seed: int = 6031769):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|