TypeError: expected a sequence of integers or a single integer #93
Replies: 1 comment
-
Hi @richard-Hobart 👋 Great to see you're interested in tstrait! I've moved the discussion to the tstrait repo. This looks like a bug, so I'll create an issue to track. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Great to see the release of tstrait last week !! I was hoping for some software that could be applied on top of msprime that would generate quantitative traits.
I have been attempting to use it but have run into some problems. Wondering if anyone could decipher what is going wrong.
Traceback (most recent call last):
File "/home/rkerr/dataplan-2/tbasim/Python/demography_from_tree_example.py", line 280, in
trait_df = tstrait.sim_trait(ts_new, num_causal=nqtl, model=model, random_seed=1234)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rkerr/.local/lib/python3.11/site-packages/tstrait/simulate_effect_size.py", line 137, in sim_trait
trait_df = simulator._sim_causal_mutation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rkerr/.local/lib/python3.11/site-packages/tstrait/simulate_effect_size.py", line 57, in _sim_causal_mutation
site_id_array = self._choose_causal_site()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rkerr/.local/lib/python3.11/site-packages/tstrait/simulate_effect_size.py", line 38, in _choose_causal_site
site_id = self.rng.choice(
^^^^^^^^^^^^^^^^
File "_generator.pyx", line 847, in numpy.random._generator.Generator.choice
TypeError: expected a sequence of integers or a single integer, got '400.0'
If this is the wrong category to be asking for help, please direct me to the proper category.
Richard Kerr
Beta Was this translation helpful? Give feedback.
All reactions