-
-
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
Implement BitArray construction from iterables #19018
Conversation
@@ -271,7 +265,7 @@ end | |||
Broadcasts the arrays, tuples and/or scalars `As` to a container of the | |||
appropriate type and dimensions. In this context, anything that is not a | |||
subtype of `AbstractArray` or `Tuple` is considered a scalar. The resulting | |||
container is stablished by the following rules: | |||
container is established by the following rules: |
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.
does this need a make docs
run? commit the rst change too if there is one
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 didn't notice that. I have updated the rst and put this change in a separate commit now.
0390644
to
50d1d0d
Compare
in particular, can now use generators. Fixes #3166
[ci skip]
50d1d0d
to
b235abd
Compare
While not strictly a bugfix, I suppose this could be backported easily (if no issues arise). |
It seems like more of a feature, and would be easy to write code that worked in (say) 0.5.2 but not 0.5.0 if it were backported, I'd usually rather not. Could maybe be supported with |
@tkelman yes you're right, this is definitely a feature, it's probably best not to backport it after all. As for Compat support, it could be done for 0.5 (just copying the code from this PR in Compat would do the trick), but I think not for 0.4, because 1) generator syntax cannot be parsed, and 2) the constructor dispatches on the shape traits of the iterator argument, which I don't think are available in 0.4. |
The new constructors were introduced in #19018. The docs are actually also for the old constructors. [ci skip]
The new constructors were introduced in #19018. The docs are actually also for the old constructors. [ci skip]
The new constructors were introduced in JuliaLang#19018. The docs are actually also for the old constructors. [ci skip]
In particular, can now use generators, e.g.
BitArray(isodd(x) for x = 1:20)
and similar.Fixes #3166.