-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Arraypocalypse slicing compatibility #158
Comments
Ugh, the above approach doesn't work cleanly due to a raft of ambiguities when defining the appropriate |
Are you (or is anyone else) working on this? The occasions where I think this would come handy seem to become more often, lately... |
No, I'm afraid I haven't had time to look at it. I've been stuck on 0.4 lately. |
Is it the fact that |
Right, and Oh, and beyond the scope of this issue maybe, but what about sparse matrices? |
@andreasnoack good point. It's not an ideal solution though - it litters package code with constructs which are not obviously related to backward compatibility. |
I cannot come up with anything nice right now. I guess that @c42f I'm fine with |
The best approach would be to "backport" the |
@timholy I guess this would mean the |
I think it would be manageable, but probably the challenges will be clear only by trying it. I would think about adding a global variable |
I've tried @c42f's idea of rewriting |
Is this still relevant? |
Theoretically, yes. We still support Julia 0.4 which differs from Julia 0.5 and later in this respect and have no I'd say we keep this open until we bump minimum Julia version to 0.5, close it then (along with JuliaLang/julia#179). |
In practice I haven't found this to be a major pain point in packages I maintain. It's a bit of an annoyance on occasion, but working around it manually isn't too hard. |
|
Not a lot has happened over at JuliaLang/LinearAlgebra.jl#255 yet, but the breakage from APL-style slicing (JuliaLang/julia#13612) is already apparent. I hope there's something that can be done in Compat to ease the slicing transition. Here's one possibility:
@compat A[:,1]
rewrites the:ref
AST node to include a placeholder type which can be dispatched on - something likeA[SliceAPL, :, 1]
.getindex
andsetindex!
taking aSliceAPL
as the first index, which inspect the types of the incoming slice expression and squeeze out any singleton dimensions as required.The text was updated successfully, but these errors were encountered: