Skip to content

laplacian should skip non-length dimensions #3105

@dopplershift

Description

@dopplershift

laplacian is implemented naively and just sums the second derivative across the selected dimensions, which is all of them by default. When given an xarray, we could:

  1. skip any dimension that doesn't have dimensionality of length.
  2. skip any dimension that has dimensionality of time (what about pressure?)

Noted in this Stack Overflow question. I'm not sure if there are downsides, but the current failure mode of a DimensionalityError is a bit tricky to decipher.

We should also update the docs to reflect the limitations and added behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CalcPertains to calculationsArea: XarrayPertains to xarray integrationType: EnhancementEnhancement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions