question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cast ID arguments to int32 using to_np_int32

See original GitHub issue

Any 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:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
petrelharpcommented, Jun 21, 2019

Perhaps in a (new) util.py?

0reactions
jeromekellehercommented, Aug 13, 2019

Closed in #245

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found