-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add eachslice
for Julia 1.1+
#58
Conversation
julia> a = rand(3, 3, 3);
julia> nda = NamedDimsArray(a, (:a, :b, :c));
julia> @btime (() -> eachslice($a; dims=3))();
187.253 ns (3 allocations: 64 bytes)
julia> @btime (() -> eachslice($nda; dims=:c))();
267.420 ns (5 allocations: 112 bytes)
updated #34 to be an issue about improving this situation |
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
==========================================
+ Coverage 86.11% 86.42% +0.31%
==========================================
Files 8 8
Lines 216 221 +5
==========================================
+ Hits 186 191 +5
Misses 30 30
Continue to review full report at Codecov.
|
df8afaf
to
7cf8f76
Compare
eachslices
for Julia 1.1+eachslice
for Julia 1.1+
end | ||
end | ||
end | ||
|
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.
Do you think this is the best file for it ?
If you want to change it then do so, or if not then don't.
(Does not block this PR from being merge)
Everything else here is more programatic.
Maybe it is better in functions_dims
?
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 it fits with "standard base overloads" more than "messing with dimensions" - and fitted better in the corresponding test file - but 🤷♂
will leave for now :)
will bump patch version then merge |
* Add `eachslice` for Julia 1.1+ * Give each testset their own data * Bump version
eachslice
#34 (1.0 support not added, separate issue now opened for that Supporteachslice
for Julia 1.0 #59)