Skip to content

Confusing error in the performance tips page  #54170

@lee-ranaweer

Description

@lee-ranaweer

Hello, I am new to Julia. I was working through the examples on the performance tips page when I ran into this code in the types with values-as-parameters section. The example code is included below as well.

function array3(fillval, ::Val{N}) where N
    fill(fillval, ntuple(d->3, Val(N)))
end

function filter3(A::AbstractArray{T,N}) where {T,N}
    kernel = array3(1, Val(N))
    filter(A, kernel)
end

There seems to be an error when the example calls filter() with an AbstractArray as an argument where a function is expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions