Skip to content

Avoid extra data copy induced by np.ravel and np.flattenΒ #5555

Open
@rfezzani

Description

Description

Some unwanted extra data copies can be avoided when a view is needed by using ndarray.reshape(-1) instead of np.ravel and np.flatten.

Upd(@soupault): More info - https://stackoverflow.com/questions/28930465/what-is-the-difference-between-flatten-and-ravel-functions-in-numpy

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions