class_docstr: Functions that operate element-by-element on whole arrays.
  
  This is a class for LAX-backed implementations of numpy ufuncs.
code: def _accumulate_via_scan(
      self,
      arr: ArrayLike,
      axis: int = 0,
      dtype: DTypeLike | None = None,
  ) -> Array:
      assert self.nin == 2 and self.nout == 1
      check_arraylike(f"{self.__name__}.accumulate", arr)
      arr = lax_internal.asarray(arr)
  
      if dtype is None:
          dtype = jax.eval_shape(
              self._func, lax_internal._one(arr), lax_internal._one(arr)
          ).dtype
  
      if axis is None or isinstance(axis, tuple):
          raise ValueError("accumulate does not allow multiple axes")
      axis = canonicalize_axis(axis, np.ndim(arr))
  
      arr = _moveaxis(arr, axis, 0)
  
      def scan_fun(carry, _):
          i, x = carry
          y = _where(
              i == 0,
              arr[0].astype(dtype),
              self._call(x.astype(dtype), arr[i].astype(dtype)),
          )
          return (i + 1, y), y
  
      _, result = jax.lax.scan(
          scan_fun, (0, arr[0].astype(dtype)), None, length=arr.shape[0]
      )
      return _moveaxis(result, 0, axis)
  
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 9 for calling the ufunc obj's underlying member method code with example usage: obj._accumulate_via_scan(arr, axis, dtype) and returns: _moveaxis, unknown,  y,  y