Skip to content

padarray inconsistent behavior for n=1 axes #259

Description

@andrew-saydjari

I found the following surprising.

n = 0
x = rand(50,100);
xr = repeat(x,outer=[1 1 n])
println(size(xr))
pxr = ImageFiltering.padarray(xr,ImageFiltering.Pad(:reflect,(5,5,0)));
println(size(pxr))

For n!=1 this succeeds and pads the repeated matrix which is of dimension (50,100,n) to be (60,110,n). For n=1, this fails with the following error message.

"DimensionMismatch: supplied axes do not agree with the size of the array (got size (1,) for the array and (0,) for the indices"

Maybe there is something I am not understanding, but I would have expected the n=1 case to behave similarly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions