Skip to content

use array_like instead of numeric/array-like #765

Open
@wholmgren

Description

@wholmgren

The pvlib parameters/returns type documentation style is:

  • numeric : scalar, np.array, pd.Series. Typically int or float dtype.
  • array-like : np.array, pd.Series. Typically int or float dtype.

However, Numpy defines array_like as "Any sequence that can be interpreted as an ndarray. This includes nested lists, tuples, scalars and existing arrays."

I think we should follow the numpy standard. We lose the implied specification for whether or not a function works with scalar input, but this seems to be a source of confusion anyways. Instead, the docstrings for functions that require array input with length > 1 could explicitly state this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions