8000 ENH: Allow tuple arguments for `numpy.repeat` · Issue #21435 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
ENH: Allow tuple arguments for numpy.repeat #21435
Open
@tflahaul

Description

@tflahaul

Proposed new feature or change:

x.repeat(B, 0).repeat(H * W, 3)

In this case, instead of calling repeat twice, I'd love to call it a single time with something along the lines of

x.repeat(
    repeats=(B, H * W),
    axis=(0, 3)
)

or by combining the number of repetitions with the axis like so:

x.repeat((B, 0), (H * W, 3))

I'd love to know your opinions on this, thanks a lot!

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

      0