Skip to content

Output type wrong for rr2(ones(Int, (5, 5)) #4

Description

@roflmaostc
julia> x = ones(Int8, (5, 5))
5×5 Matrix{Int8}:
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1

julia> rr2(x)
5×5 IndexFunArray{Float64, 2, IndexFunArrays.var"#4#5"{Float64, Tuple{Float64, Float64}, Tuple{Int64, Int64}}}:
 8.0  5.0  4.0  5.0  8.0
 5.0  2.0  1.0  2.0  5.0
 4.0  1.0  0.0  1.0  4.0
 5.0  2.0  1.0  2.0  5.0
 8.0  5.0  4.0  5.0  8.0

julia> rr2(Int, size(x))
5×5 IndexFunArray{Int64, 2, IndexFunArrays.var"#4#5"{Int64, Tuple{Float64, Float64}, Tuple{Int64, Int64}}}:
 8  5  4  5  8
 5  2  1  2  5
 4  1  0  1  4
 5  2  1  2  5
 8  5  4  5  8

However, documentation says:

  rr2(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)


  This is a wrapper for rr2(eltype(arr), size(arr), scaling=scaling, offset=offset).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions