class_docstr: Functions that operate element-by-element on whole arrays.
  
  This is a class for LAX-backed implementations of numpy ufuncs.
code: def reduce(
      self,
      a: ArrayLike,
      axis: int = 0,
      dtype: DTypeLike | None = None,
      out: None = None,
      keepdims: bool = False,
      initial: ArrayLike | None = None,
      where: ArrayLike | None = None,
  ) -> Array:
      check_arraylike(f"{self.__name__}.reduce", a)
      if self.nin != 2:
          raise ValueError("reduce only supported for binary ufuncs")
      if self.nout != 1:
          raise ValueError(
              "reduce only supported for functions returning a single value"
          )
      if out is not None:
          raise NotImplementedError(
              f"out argument of {self.__name__}.reduce()"
          )
      if initial is not None:
          check_arraylike(f"{self.__name__}.reduce", initial)
      if where is not None:
          check_arraylike(f"{self.__name__}.reduce", where)
          if self.identity is None and initial is None:
              raise ValueError(
                  f"reduction operation {self.__name__!r} does not have an identity, "
                  "so to use a where mask one has to specify 'initial'."
              )
          if lax_internal._dtype(where) != bool:
              raise ValueError(
                  f"where argument must have dtype=bool; got dtype={lax_internal._dtype(where)}"
              )
      primitive = get_if_single_primitive(
          self._call, *(self.nin * [lax_internal._one(a)])
      )
      if primitive is None:
          reducer = self._reduce_via_scan
      else:
          reducer = _primitive_reducers.get(
              primitive, self._reduce_via_scan
          )
      return reducer(
          a,
          axis=axis,
          dtype=dtype,
          keepdims=keepdims,
          initial=initial,
          where=where,
      )
  
imports: from __future__ import annotations
  from functools import partial
  import math
  import operator
  from typing import Any, Callable
  import jax
  from jax._src.typing import Array, ArrayLike, DTypeLike
  from jax._src.lax import lax
  from jax._src.numpy import reductions
  from jax._src.numpy.lax_numpy import _eliminate_deprecated_list_indexing, append, take
  from jax._src.numpy.reductions import _moveaxis
  from jax._src.numpy.util import _wraps, check_arraylike, _broadcast_to, _where
  from jax._src.numpy.vectorize import vectorize
  from jax._src.util import canonicalize_axis, set_module
  import numpy
label_desc: Use image node_id 6 for calling the ufunc obj's underlying member method code with example usage: obj.reduce(a, axis, dtype, out, keepdims, initial, where) and returns: reducer