ma.asarray() should pass through objects of the right type · Issue #4043 · numpy/numpy · GitHub
Skip to content

ma.asarray() should pass through objects of the right type #4043

Description

@abalkin

For performance and consistency with np.asarray, ma.asarray should pass through objects that are already of the right type:

>>> x = np.array([])
>>> m = np.ma.array([])
>>> x is np.asarray(x)
True
>>> m is np.ma.asarray(m)
False

Same applies to ma.asanyarray.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions