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
Add
spreadmissings
#122base: master
Are you sure you want to change the base?
Add
spreadmissings
#122Changes from 6 commits
a3a0cf5
2ed4b85
298a5df
b3163ce
60910e8
3b6621f
fdecc8b
4e77fa8
08045ef
6897e26
67be697
29d95c7
48ab861
4debddc
7db9f68
8bfb642
27a26f7
c625884
00b951a
c85a4c8
ea39189
e653c5a
788b9e9
4c0a744
50d8ffa
bfef988
c667ed8
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.
How about throwing an error in this case for now? It doesn't seem very useful.
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.
No I disagree. I want people to be able to code defensively with this tool. throwing an error would defeat the purpose a bit.
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. Something that occurred to me though: should we do something special if one of the non-vector arguments is
missing
(like returningmissing
)? Should we reserve this behavior for the future in case we wantspreadmissings
to be a more general version ofpassmissing
?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 don't think so. We definitely can't return
missing
, we would have to return a vector ofmissing
s, which seems very restrictive.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.
Not sure what "restrictive" means here. That would be similar to e.g.
broadcast(+, missing, [1, 2, 3])
.Whether that makes sense depends on what
f
does with its inputs, but I can't find examples of functions to which one would pass one or more vectors plus amissing
argument and would not expect the resulting vector to be full ofmissing
s. So reserving the situation where one argument ismissing
could be a good idea in case we want to handle it later.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.
What do you think? At least throwing an error if any of the inputs is
missing
for now doesn't seem too problematic?