-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Arraylike: AbstractArrays without an eltype #32940
Comments
I think it would be more realistic to use eltype |
Oh, ok, if that would be easier. |
Ok, while I'm at it, it would be nice to have abstractarray machinery for all sorts of things, zips of arrays, generators of arrays |
Actually, we could just change most AbstractArray functions to be Union{AbstractArray, AbstractEltypelessArray} and nip the problem in the bud, I think. |
Took a shower, came back, and realized that because this is a meaningful subtype relationship, we don't need traits or Unions. PR coming. |
TADA problem solved |
Welp, its not that easy because AbstractArray is implemented in C according to boot.jl. I'll punt on making a PR. |
The type is not compile time. |
👍 for this direction. I needed to emulate |
@JeffBezanson this is the stickingpoint for adding JuliennedArrays functionality to base. I was looking through src to see how hard it would be to add Arraylike to base. I see that Signed is added in base/boot.jl, and Int64 is added in src/builtins.c, but where is the code that says Int64 <: Signed? |
See discussion in #34196 |
Would be useful for many packages, JuliennedArrays, LightQuery, SplitApplyCombine, MappedArrays, Query, etc. Base already has an AbstractEltypelessArray: the lazy broadcast machinery, it would just be a matter of formalizing the interface. Given that traits aren't coming any time soon, it couldn't be
<: AbstractArray
, so we would have to duplicate all of the machinery forAbstactArrays
. I could try to build a prototype if people are interested?The text was updated successfully, but these errors were encountered: