Skip to content

Is np.alen in use/needed? #14155

@stuartarchibald

Description

@stuartarchibald

This was opened on the Numba issue tracker: numba/numba#4374

It seems like NumPy has a function alen() which does AFAICT not appear in the documentation but evidently exists https://github.com/numpy/numpy/blob/master/numpy/core/fromnumeric.py#L2758. Git blame suggests it appeared in and hasn't changed since ~2005. I cannot see any places in the NumPy code base where this is used apart from its own unit tests. It also has some perhaps unusual behaviour, e.g.:

import numpy as np
np.alen(np) # <--- yes this works !

I'm not sure what the use case for this function would be?
Perhaps it {c,sh}ould be considered for deprecation?

Metadata

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