Skip to content

Should reshape() accept Integer as dims rather than only Int? #17372

@davidavdav

Description

@davidavdav

Currently, reshape requires the dimension parameters to be Int

reshape(parent::AbstractArray, dims::Int...) = reshape(parent, dims)

I am not sure if this is required for efficiency reasons, but I wonder if this could be changed to Integer?

In reading binary formatted data I often come across the situation where dimensions of an array are specified as Int32, and then the matrix data that follows has to be reshaped accordingly. Currently I have to escape the dimension specification using Int(), a small effort, but it would be slightly cleaner if that would not be required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]help wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions