File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,15 @@ def get_example_individuals_ts_with_metadata(
120
120
tables .metadata = {f"a_{ j } " : j for j in range (n )}
121
121
tables .populations .clear ()
122
122
tables .individuals .clear ()
123
+ rng = np .random .default_rng (123 )
123
124
for i in range (n ):
124
125
location = [i , i ]
125
126
individual_meta = {}
126
127
pop_meta = {}
127
128
if i % 2 == 0 :
128
129
# Add unicode metadata to every other individual: 8544+i = Roman numerals
129
130
individual_meta = {"unicode id" : chr (8544 + i )}
130
- individual_flags = np . random . randint (0 , np .iinfo (np .uint32 ).max )
131
+ individual_flags = rng . integers (0 , np .iinfo (np .uint32 ).max , dtype = np . int64 )
131
132
# Also for populations: chr(127462) + chr(127462+i) give emoji flags
132
133
pop_meta = {"utf" : chr (127462 ) + chr (127462 + i )}
133
134
tables .populations .add_row (metadata = pop_meta ) # One pop for each individual
You can’t perform that action at this time.
0 commit comments