def mean(
        self,
        axis: Any = None,
        dtype: np.dtype[Any] | None = None,
        out: ndarray | None = None,
        keepdims: bool = False,
        where: ndarray | None = None,
    ) -> ndarray:
        """a.mean(axis=None, dtype=None, out=None, keepdims=False)

        Returns the average of the array elements along given axis.

        Refer to :func:`cupynumeric.mean` for full documentation.

        See Also
        --------
        cupynumeric.mean : equivalent function

        Availability
        --------
        Multiple GPUs, Multiple CPUs

        """
        if axis is not None and not isinstance(axis, int):
            raise NotImplementedError(
                "cupynumeric.mean only supports int types for "
                "`axis` currently"
            )

        dtype = self._summation_dtype(dtype)
        where_array = broadcast_where(where, self.shape)

        # Do the sum
        sum_array = (
            self.sum(
                axis=axis,
                out=out,
                keepdims=keepdims,
                dtype=dtype,
                where=where_array,
            )
            if out is not None and out.dtype == dtype
            else self.sum(
                axis=axis, keepdims=keepdims, dtype=dtype, where=where_array
            )
        )

        self._normalize_summation(
            sum_array, axis, keepdims=keepdims, where=where_array
        )

        # Convert to the output we didn't already put it there
        if out is not None and sum_array is not out:
            assert out.dtype != sum_array.dtype
            out._thunk.convert(sum_array._thunk)
            return out
        else:
            return sum_array
a.mean(axis=None, dtype=None, out=None, keepdims=False)

        Returns the average of the array elements along given axis.

        Refer to :func:`cupynumeric.mean` for full documentation.

        See Also
        --------
        cupynumeric.mean : equivalent function

        Availability
        --------
        Multiple GPUs, Multiple CPUs

        
cupynumeric/_array/array.py