Skip to content

Commit

Permalink
CODE: genetic_value
Browse files Browse the repository at this point in the history
The `genetic_value` function will produce an error when the `trait_id` column is created by numpy (i.e., np.zeros()), as it is read as a float object.
  • Loading branch information
daikitag committed Feb 9, 2024
1 parent 9ccf0a0 commit 735c23f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tstrait/genetic_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _run(self):
"""

num_ind = self.ts.num_individuals
num_trait = np.max(self.trait_df.trait_id) + 1
num_trait = int(np.max(self.trait_df.trait_id)) + 1
genetic_val_array = np.zeros((num_trait, num_ind))
tree = tskit.Tree(self.ts)

Expand Down

0 comments on commit 735c23f

Please sign in to comment.