Skip to content
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

replace BitArray(shape...) constructors/calls with BitArray(uninitialized, shape...) #24785

Merged
merged 7 commits into from
Nov 29, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Nov 26, 2017

This pull request deprecates uninitialized-BitArray constructors of the form BitArray[{N}](shape...) in favor of BitArray[{N}](uninitialized, shape...) equivalents. For background, please see #24595. Best!

@Sacha0 Sacha0 added the arrays [a, r, r, a, y, s] label Nov 26, 2017
@Sacha0 Sacha0 changed the title replace BitArray(shape...)-like with BitArray(uninitialized, shape...) replace BitArray(shape...) constructors/calls with BitArray(uninitialized, shape...) Nov 26, 2017
@Sacha0 Sacha0 added the deprecation This change introduces or involves a deprecation label Nov 26, 2017
@Sacha0 Sacha0 force-pushed the digbitarr branch 2 times, most recently from f00cc51 to c4d42fa Compare November 26, 2017 21:44
@Sacha0
Copy link
Member Author

Sacha0 commented Nov 26, 2017

Rebased and added the similar(funcortype, inds...) = funcortype(inds...) -> ... = funcortype(uninitialized, inds...) fix from #24781 (comment), which hopefully will take care of most of the depwarns. Best!

@Sacha0
Copy link
Member Author

Sacha0 commented Nov 28, 2017

Rebased again, changed to more conservative similar(funcortype, shape) changes, and fixed all test failures locally. What say you now, CI?

If CI approves and absent objections or requests for time, I plan to merge these changes this evening PT or later. Best!

@fredrikekre
Copy link
Member

I think this broke some constructors, noticed in JuliaArrays/OffsetArrays.jl#34

v0.6:

julia> BitArray(1:2)
2-element BitArray{1}:
 true
 true

master:

julia> BitArray(uninitialized, 1:2)
ERROR: MethodError: no method matching BitArray(::Uninitialized, ::UnitRange{Int64})
Closest candidates are:
  BitArray(::Uninitialized, ::Integer...) at bitarray.jl:57
  BitArray(::Uninitialized, ::Tuple{Vararg{Int64,N}}) where N at bitarray.jl:59
  BitArray(::Any) at bitarray.jl:556

@Sacha0
Copy link
Member Author

Sacha0 commented Dec 2, 2017

Yes, OffsetArrays will require definitions like those added to test/TestHelpers.jl for the OffsetArray implementation in Base :). Best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants