Skip to content

np.ravel should return the same array type it was given #5376

@Garrett-R

Description

@Garrett-R

If given a matrix, then np.ravel should return a matrix. And similarly for a masked array. Currently, it always returns an ndarray.

In PR #5358, np.diagonal was modified to return whatever array type it took in. Also, np.cumsum and np.clip return the same array type. So, np.ravel's behavior is surprising.

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