Implement BitArray construction from iterables#19018
Conversation
| 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.
does this need a make docs run? commit the rst change too if there is one
There was a problem hiding this comment.
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.