-
-
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
feature request rand support Range not just Range1 #5041
Comments
If you could finish this up and submit as a pull request, that would be great. See https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md. |
In #1135 there was brief discussion of something like
but I don't know how everybody feels about that. |
I'll try to work on this after I get installing from source to work. |
My pull request covers just Ranges, since I'm new here and I didn't want to do any more than I was specifically asked to do. But If there is agreement, I'd like to work on
So probably it would be mostly Jeff's function and |
Yes, an |
This happens because
rand(r::Range1{Int64})
is defined, butrand(Range{Int64},)
is not. It seems fairly straightforward to extend rand to supportRange
. Part of the implementation is here. For exampleseems to work. It seems like the ideal way would be to define based on 'Ranges' and it should work for both 'Range1' and 'Range'.
The text was updated successfully, but these errors were encountered: