Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union-type data in Numba #174

Closed
jpivarski opened this issue Mar 18, 2020 · 2 comments
Closed

Union-type data in Numba #174

jpivarski opened this issue Mar 18, 2020 · 2 comments
Labels
feature New feature or request

Comments

@jpivarski
Copy link
Member

Currently, union-type data can pass through Numba, but it can't be operated on (__getitem__). This is a particularly hard problem because Numba has no dynamic types (unlike C++, which at least has runtime polymorphism/virtual methods). It could be represented by a new ArrayView that holds multiple possibilities, some MultiArrayView, and it can raise exceptions at runtime if the tag is inappropriate for any one of those views. However, the view that does not raise an exception, which ultimately resolves to a number, has MultiArrayView type in Numba but must satisfy all the operations of a number. "All the operations of a number" is an extremely wide-open set—this is the hard part, figuring out how to make a new type that satisfies everything a number satisfies.

We might need help from Numba experts on this one.

@jpivarski jpivarski added the feature New feature or request label Mar 18, 2020
@jpivarski
Copy link
Member Author

Old references to this same issue: #85 (first consideration) and #95 (was going to include UnionArray, but I saw how hard that would be).

@jpivarski
Copy link
Member Author

I don't think it would be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant