coordinates.mixins.mathops.CoordinateSystemMathMixin.requires_expression_from_coordinates#

CoordinateSystemMathMixin.requires_expression_from_coordinates(value: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None, expression: str, coordinates: Sequence[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]], fixed_axes: Dict[str, float] | None = None, sparse: bool = False) _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str][source]#

Return value if not None; otherwise evaluate compute_expression_from_coordinates.

This is a convenience wrapper for evaluating on 1D coordinate arrays with optional fixed axes.

Parameters:
  • value (array-like or None) – Precomputed result or None to trigger evaluation.

  • expression (str) – The name of the expression to evaluate if value is None.

  • coordinates (list of array-like) – 1D arrays for each free coordinate axis.

  • fixed_axes (dict of {str: float}, optional) – Fixed scalar coordinate values.

  • sparse (bool, optional) – Whether to construct sparse coordinate arrays.

Returns:

Either the provided value or the computed result.

Return type:

array-like