Cast ID arguments to int32 using to_np_int32
See original GitHub issueAny place we are providing a list of IDs as input to a function we should use the to_np_int32
function defined in #185 to safely convert them.
These will be in the Tables API (node IDs, site IDs, etc), and where we compute stats (GNN, eg, takes lists of samples).
Note there are still a number of functions that don’t use the numpy C API (e.g., Tree.pairwise_diversity and TreeSequence.trees) but Python lists instead, which are overdue being updated (#64).
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Can I cast Int64 directly into Int? - Stack Overflow
I've been using SQLite.swift lately to build my app database. And I'm defining all my INTEGER columns with a Int64 type, like the...
Read more >BitConverter Class (System) - Microsoft Learn
Returns a Boolean value converted from the byte at a specified position in a byte array. Converts a read-only byte span to a...
Read more >Confusing pointer conversion | Apple Developer Forums
I've tried to follow to shifting model of pointers in Swift (I understand it's for the best)… but now I'm completly lost. How...
Read more >C - Type Casting - Tutorialspoint
Converting one datatype into another is known as type casting or, type-conversion. For example, if you want to store a 'long' value into...
Read more >Chapter 3. Working with types - Windows PowerShell in Action ...
“When I use a word,” Humpty Dumpty said, in rather a scornful tone, “it means just what I choose it ... Int32. Try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Perhaps in a (new)
util.py
?Closed in #245