Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Jan 14, 2021

Currently on master:

julia> OffsetArray(zeros(3), big(2))
ERROR: MethodError: no method matching OffsetArray{Float64,1,Array{Float64,1}}(::Array{Float64,1}, ::Tuple{BigInt})

After this PR:

julia> OffsetArray(zeros(3), big(2))
3-element OffsetArray(::Array{Float64,1}, 3:5) with eltype Float64 with indices 3:5:
 0.0
 0.0
 0.0

Also change the error type in overflow checks from ArgumentError to OverflowError.

@jishnub jishnub changed the title OffsetArray constructor accepts Integer offsets OffsetArray constructor accepts Integer offsets instead of only Int ones Jan 14, 2021
@codecov
Copy link

codecov bot commented Jan 14, 2021

Codecov Report

Merging #188 (171144a) into master (94a4172) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #188   +/-   ##
=======================================
  Coverage   98.91%   98.92%           
=======================================
  Files           5        5           
  Lines         277      279    +2     
=======================================
+ Hits          274      276    +2     
  Misses          3        3           
Impacted Files Coverage Δ
src/OffsetArrays.jl 98.93% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94a4172...171144a. Read the comment docs.

@jishnub jishnub merged commit df73941 into JuliaArrays:master Jan 15, 2021
@jishnub jishnub deleted the generalizeconstructor branch January 17, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants