Skip to content

replace limits set with numpy/pandas slicing with np.maximum and np.minimum  #201

@wholmgren

Description

@wholmgren

A number of functions use numpy/pandas slicing or clip to set their limits. This leads to unnecessary requirements on the input data, unnecessary type promotion of the output data, and/or unnecessary code in the functions. Many of the limits can instead be set with np.maximum and np.minimum.

The easy functions to fix include:

  • haurwitz
  • beam_component
  • haydavies
  • reindl
  • king

Other functions that rely on bins or masks need array-like inputs or coercion and require a little more effort. These include:

  • perez
  • disc
  • dirint
  • erbs
  • singleaxis
  • relativeairmass
  • ashraeiam
  • physicaliam
  • snlinverter
  • pyephem_earthsun_distance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions