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

reword eachslice docs to allow other slices objects #57428

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

rafaqz
Copy link
Contributor

@rafaqz rafaqz commented Feb 16, 2025

The wording of eachslice is overly strict in enforcing a Slices return type, instead of allowing other objects with similar behavior but e.g. potentially additional behaviors. The existence of AbstractSlices suggests this was actually intended at some stage but did not make it into the docs.

AxisKeys.jl already returns something else and it seems not to cause any problems, but it would be good to be able to do this without breaking the documented contract of the method.

Closes #57206

@LilithHafner LilithHafner added docs This change adds or pertains to documentation breaking This change will break code labels Feb 16, 2025
@LilithHafner
Copy link
Member

While this is technically breaking I think it is clearly a good idea.

Co-authored-by: Lilith Orion Hafner <[email protected]>
@LilithHafner LilithHafner merged commit 9294132 into JuliaLang:master Feb 23, 2025
7 checks passed
@rafaqz rafaqz deleted the patch-3 branch February 23, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change will break code docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does eachslice on AbstractArray have to return Slices ?
2 participants