JuliaArrays / MappedArrays.jl
Showing 1 of 3 files from the diff.
Other files ignored by Codecov
test/runtests.jl has changed.
Project.toml has changed.

@@ -58,7 +58,7 @@
Loading
58 58
When multiple input arrays are supplied, `M[i] = f(A[i], B[i], C[i]...)`.
59 59
"""
60 60
function mappedarray(f, data::AbstractArray)
61 -
    T = typeof(f(testvalue(data)))
61 +
    T = Base._return_type(f, eltypes(data))
62 62
    ReadonlyMappedArray{T,ndims(data),typeof(data),typeof(f)}(f, data)
63 63
end
64 64
@@ -67,7 +67,7 @@
Loading
67 67
end
68 68
69 69
function mappedarray(f, data::AbstractArray...)
70 -
    T = typeof(f(map(testvalue, data)...))
70 +
    T = Base._return_type(f, eltypes(data))
71 71
    ReadonlyMultiMappedArray{T,ndims(first(data)),typeof(data),typeof(f)}(f, data)
72 72
end
73 73
@@ -86,12 +86,12 @@
Loading
86 86
When multiple input arrays are supplied, `M[i] = f(A[i], B[i], C[i]...)`.
87 87
"""
88 88
function mappedarray(f, finv, data::AbstractArray)
89 -
    T = typeof(f(testvalue(data)))
89 +
    T = Base._return_type(f, eltypes(data))
90 90
    MappedArray{T,ndims(data),typeof(data),typeof(f),typeof(finv)}(f, finv, data)
91 91
end
92 92
93 93
function mappedarray(f, finv, data::AbstractArray...)
94 -
    T = typeof(f(map(testvalue, data)...))
94 +
    T = Base._return_type(f, eltypes(data))
95 95
    MultiMappedArray{T,ndims(first(data)),typeof(data),typeof(f),typeof(finv)}(f, finv, data)
96 96
end
97 97
@@ -99,7 +99,7 @@
Loading
99 99
    MultiMappedArray{T,ndims(first(data)),typeof(data),Type{T},typeof(finv)}(T, finv, data)
100 100
end
101 101
function mappedarray(f, ::Type{Finv}, data::AbstractArray...) where Finv
102 -
    T = typeof(f(map(testvalue, data)...))
102 +
    T = Base._return_type(f, eltypes(data))
103 103
    MultiMappedArray{T,ndims(first(data)),typeof(data),typeof(f),Type{Finv}}(f, Finv, data)
104 104
end
105 105
Files Coverage
src/MappedArrays.jl 84.55%
Project Totals (1 files) 84.55%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading