-
Notifications
You must be signed in to change notification settings - Fork 41
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
_unsafe_wrap: Allow ind NTuple to have mixed AbstractUnitRanges #296
Conversation
Codecov Report
@@ Coverage Diff @@
## master #296 +/- ##
=======================================
Coverage 96.35% 96.35%
=======================================
Files 5 5
Lines 439 439
=======================================
Hits 423 423
Misses 16 16
Continue to review full report at Codecov.
|
@@ -2697,5 +2692,12 @@ end | |||
@test unsafe_wrap(OffsetArray, p, 2:3, 3:5, 4:7) isa OffsetArray{UInt8, 3} | |||
@test unsafe_wrap(OffsetArray, p, (2:3, 3:5, 4:7)) isa OffsetArray{UInt8, 3} | |||
@test unsafe_wrap(OffsetVector, p, 1:(2*3*4) .- 1) isa OffsetVector{UInt8} | |||
@test unsafe_wrap(OffsetMatrix, p, 1:(2*3) .+ 6, 4:7; own = true) isa OffsetMatrix{UInt8} |
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've not followed this closely, but is this test not valid? Or is it simply unnecessary?
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.
Since I only allocated one pointer, there can only be one own = true
, otherwise Julia will try to free the pointer twice.
LGTM overall |
Could you also bump the patch version? |
Thanks for the suggestion. Version has been bumped to 1.12.1 |
master:
This pull request
This normalizes
unsafe_wrap
to take similar arguments as the constructors.