diff options
author | Arun Isaac | 2025-07-17 18:19:17 +0100 |
---|---|---|
committer | Arun Isaac | 2025-07-17 20:45:58 +0100 |
commit | b253be6baa14a5c530589e75055029a58a575c90 (patch) | |
tree | f9e7d34ba3b85448135c209d352e32773a1fd2ec | |
parent | ad40f2caa74716b930000bd4518f16674e626b75 (diff) | |
download | pyhegp-b253be6baa14a5c530589e75055029a58a575c90.tar.gz pyhegp-b253be6baa14a5c530589e75055029a58a575c90.tar.lz pyhegp-b253be6baa14a5c530589e75055029a58a575c90.zip |
Move read_genotype to pyhegp.serialization.
* pyhegp/pyhegp.py: Import read_genotype from pyhegp.serialization.
(read_genotype): Move to pyhegp.serialization.
-rw-r--r-- | pyhegp/pyhegp.py | 5 | ||||
-rw-r--r-- | pyhegp/serialization.py | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pyhegp/pyhegp.py b/pyhegp/pyhegp.py index 9fa9679..0c0d237 100644 --- a/pyhegp/pyhegp.py +++ b/pyhegp/pyhegp.py @@ -22,7 +22,7 @@ import click import numpy as np from scipy.stats import special_ortho_group -from pyhegp.serialization import Summary, read_summary, write_summary +from pyhegp.serialization import Summary, read_summary, write_summary, read_genotype Stats = namedtuple("Stats", "n mean std") @@ -56,9 +56,6 @@ def pool_stats(list_of_stats): / (n - 1)) return Stats(n, mean, std) -def read_genotype(genotype_file): - return np.loadtxt(genotype_file, delimiter=",") - @click.group() def main(): pass diff --git a/pyhegp/serialization.py b/pyhegp/serialization.py index cdf1587..9b0401a 100644 --- a/pyhegp/serialization.py +++ b/pyhegp/serialization.py @@ -51,3 +51,6 @@ def write_summary(file, summary): np.savetxt(file, np.row_stack((summary.mean, summary.std)), fmt="%.8g") + +def read_genotype(genotype_file): + return np.loadtxt(genotype_file, delimiter=",") |