Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
hvncat
: Better handling of 0- and 1-length dims/shape args #41197hvncat
: Better handling of 0- and 1-length dims/shape args #41197Changes from all commits
1b35e95
b25b530
ec59c12
a80a522
e73244c
c5f3497
c724b93
cc6cd7e
af6b44c
a8d71bc
b4cfd43
632ef9b
a8c5d6e
cd55f21
415fe84
be7d439
e114402
aa80b40
77c078d
19530be
52166b3
046752c
f730a60
bc53fc7
264f3bc
b565092
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 we really need to allow this? Passing
()
for 0-d makes sense, but this form doesn't to me, since there is no dimension 0.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.
hvncat(::Int, args...)
is just a specialization forhvncat(::Tuple{Vararg{Int}}, true, args...)
, so it continues this pattern:That does mean, though, I could actually consolidate the
_typed_hvncat
methods for the 0-d cases to all refer to_typed_hvncat(::Type{T}, ::Val{0}, args...)
, or vice versa.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.
Ok, I guess the way to understand it is that it refers to the number of dimensions of the block array?
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.
Yeah, and it's the special case where there is only one dimension involved:
[a ;;; b ;;; c] => hvncat(3, a, b, c)
or[a ;;;] => hvncat(3, a)
, which just bumps up the dimensions if ndims(a) < 3.