-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
problematic max and/or splatting #9439
Comments
You are looking for |
I'm still not convinced the |
And the help is outright lying; @waTeim, care to submit a documentation fix? |
The doc isn't lying! it's just misleading for people that doesn't understand the terminology. The distinction is pretty subtle, but important, because of multiple dispatch and our habit to be able to do reduction operations with an optional |
This isn't a very meaningful distinction. What you're referring to is the ordering of operations in addition, which is what both |
You're right, of course. But certainly this is a good example of our documentation being too terse; it would be really easy to interpret that as meaning that |
I wonder whether we might be able to get rid of |
@johnmyleswhite, I think @ivarne meant this:
|
Ah, thanks @timholy. |
@johnmyleswhite, |
Thanks @timholy. I should've made it clear that I had huge problems understanding the difference between I don't see how we can get rid of the elementwise |
Some examples and a cross reference to A faster |
@ivarne Right, that was a silly idea. That's really more a naming issue than anything else. |
Ok, got it, I'll play the roll of user here, provide some feedback
|
@waTeim Regarding your points:
|
I think we really should take the max/maximum issue as an example where we/Julia reach limits and learn from it how to proceed. Documentation is nice but lets be honest. The documentation will be there because of unintuitive naming. I don't have a solution but my understanding is that we will not be able to use a single function name for the two purposes. What about removing |
|
The distinction seems pretty clear now:
|
Ok trying it....
Ok, maybe splatting?
In comparison
Also
julia> @time maxabs(rand(100)...)
ERROR:
maxabs
has no method matching maxabs(::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64)The reason I pasted this is because it took a long time for this to return the first time but then was very fast the next time for a whole bunch of different values less than 100, so I think it's probably trying to compile for all possibilities up to 100.
Pretty up-to-date
The text was updated successfully, but these errors were encountered: