From b253be6baa14a5c530589e75055029a58a575c90 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 17 Jul 2025 18:19:17 +0100 Subject: Move read_genotype to pyhegp.serialization. * pyhegp/pyhegp.py: Import read_genotype from pyhegp.serialization. (read_genotype): Move to pyhegp.serialization. --- pyhegp/pyhegp.py | 5 +---- 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=",") -- cgit v1.2.3