e3x.ops.indexed.indexed_max

e3x.ops.indexed.indexed_max(inputs, keepdims=None, *, adj_idx=None, where=None, dst_idx=None, num_segments=None, indices_are_sorted=False, **_)[source]

Determines the maximum of inputs according to sparse or dense index lists.

Parameters:
  • inputs (<class 'Num[Array, '_*indexable_by_relevant_idx']'>) – Inputs for which to determine the maximum.

  • keepdims (Optional[bool], default: None) – Whether to keep the dimensions of the inputs (so that outputs can be broadcasted to the shape of the inputs). In the case of dense index lists, one axis will be reduced to size 1, in the case of sparse index lists, the shape of inputs and outputs will be the same.

  • adj_idx (Optional[Integer[Array, '... N M']], default: None) – Adjacency indices.

  • where (Optional[Bool[Array, '... N M']], default: None) – Mask to specify which values to take the maximum from, required for dense index lists.

  • dst_idx (Optional[Integer[Array, '... P']], default: None) – Destination indices.

  • num_segments (Optional[int], default: None) – Number of segments after taking the maximum, required for sparse index lists.

  • indices_are_sorted (bool, default: False) – If True, dst_idx is assumed to be sorted, which may increase performance (only used for sparse index lists).

Return type:

<class 'Num[Array, '_*input_shape_indexed_by_relevant_idx']'>

Returns:

An array with the maximum values.

Raises:
  • RuntimeError – If neither dense nor sparse index lists are provided, or if both are provided.

  • ValueError – If inputs are not floating point or integer dtype.