-
Notifications
You must be signed in to change notification settings - Fork 23
add PermutedDimsArray method that returns PermutedDiskArray #249
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
Conversation
|
Ok so to remove the recursive PermuteDimsArray I moved type parameters Then there were some issues with parent access after changes to PermutedDiskArray, so I went ahead and swapped everything to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Would you consider this change to be breaking?
| PermutedDiskArray{T,N,perm,iperm,A}(a) | ||
|
|
||
| ConstructionBase.constructorof(::Type{<:PermutedDiskArray{<:Any,N,perm,iperm}}) where {N,perm,iperm} = | ||
| PermutedDiskArrayConstructor{N,perm,iperm}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding the ConstructionBase dependecy is a good addition. I think there are several places in DiskArrays where we added unnecessary fields to types that might have lived in the type parameter only, so we could slowly replace these as well.
|
I guess it could be considered technically breaking, But I imagine the scope of the break is fairly limited. The |
|
I guess DD is going to require this to make permutedims work, right? So then it really wouldn't be ideal to release a 0.5 - it would cause compatibility issues with the whole ecosystem until everyone updates. A |
|
Absolutely, I think we should just st bump a patch version |
|
I hadn't noticed this change until now, but this broke some code in one of my packages where I define my own permuteddims(a::AbstractArray, perm) = PermutedDimsArray(a, perm)
permuteddims(a::AbstractDiskArray, perm) = PermutedDiskArray(a, perm)and then use |
|
The problem is the interface to other packages and users that don't know about this method. And that anyone ever calling PermuteDimsArrray on a disk array is fundamentally broken (it causes scalar indexing) and shouldnt be allowed to happen in any case. We really need a method in Base Julia, as you have read in my issue. |
Closes #240