diff --git a/dask/array/reductions.py b/dask/array/reductions.py
index 3f05e1628..a29003285 100644
--- a/dask/array/reductions.py
+++ b/dask/array/reductions.py
@@ -1,12 +1,12 @@
 from __future__ import absolute_import, division, print_function
 
 from functools import partial, wraps
-from itertools import product
+from itertools import product, repeat
 from math import factorial, log, ceil
 import operator
 
 import numpy as np
-from toolz import compose, partition_all, merge, get
+from toolz import compose, partition_all, merge, get, accumulate, pluck
 
 from . import chunk
 from .core import _concatenate2, Array, atop, sqrt, lol_tuples
@@ -34,6 +34,22 @@ def reduction(x, chunk, aggregate, axis=None, keepdims=None, dtype=None,
     if dtype and 'dtype' in getargspec(aggregate).args:
         aggregate = partial(aggregate, dtype=dtype)
 
+    # Map chunk across all blocks
+    inds = tuple(range(x.ndim))
+    tmp = atop(partial(chunk, axis=axis, keepdims=True), inds, x, inds)
+    tmp._chunks = tuple((1,)*len(c) if i in axis else c for (i, c)
+                        in enumerate(tmp.chunks))
+
+    return _tree_reduce(tmp, aggregate, axis, keepdims, dtype, split_every,
+                       combine)
+
+
+def _tree_reduce(x, aggregate, axis, keepdims, dtype, split_every=None,
+                combine=None):
+    """Perform the tree reduction step of a reduction.
+
+    Lower level, users should use ``reduction`` or ``arg_reduction`` directly.
+    """
     # Normalize split_every
     split_every = split_every or _globals.get('split_every', 4)
     if isinstance(split_every, dict):
@@ -44,24 +60,18 @@ def reduction(x, chunk, aggregate, axis=None, keepdims=None, dtype=None,
     else:
         split_every = dict((k, v) for (k, v) in enumerate(x.numblocks) if k in axis)
 
-    # Map chunk across all blocks
-    inds = tuple(range(x.ndim))
-    tmp = atop(partial(chunk, axis=axis, keepdims=True), inds, x, inds)
-    tmp._chunks = tuple((1,)*len(c) if i in axis else c for (i, c)
-                        in enumerate(tmp.chunks))
-
     # Reduce across intermediates
     depth = 1
-    for i, n in enumerate(tmp.numblocks):
+    for i, n in enumerate(x.numblocks):
         if i in split_every and split_every[i] != 1:
             depth = int(builtins.max(depth, ceil(log(n, split_every[i]))))
     func = compose(partial(combine or aggregate, axis=axis, keepdims=True),
                    partial(_concatenate2, axes=axis))
     for i in range(depth - 1):
-        tmp = partial_reduce(func, tmp, split_every, True, None)
+        x = partial_reduce(func, x, split_every, True, None)
     func = compose(partial(aggregate, axis=axis, keepdims=keepdims),
                    partial(_concatenate2, axes=axis))
-    return partial_reduce(func, tmp, split_every, keepdims=keepdims,
+    return partial_reduce(func, x, split_every, keepdims=keepdims,
                           dtype=dtype)
 
 
@@ -403,71 +413,130 @@ def vnorm(a, ord=None, axis=None, dtype=None, keepdims=False, split_every=None):
                    split_every=split_every)**(1./ord)
 
 
-def _arg_combine(data, axis, argfunc):
+def _arg_combine(data, axis, argfunc, keepdims=False):
     """Merge intermediate results from ``arg_*`` functions"""
+    axis = None if len(axis) == data.ndim or data.ndim == 1 else axis[0]
     vals = data['vals']
     arg = data['arg']
-    ns = data['n']
-    args = argfunc(vals, axis=axis)
-    offsets = np.roll(np.cumsum(ns, axis=axis), 1, axis)
-    offsets[tuple(slice(None) if i != axis else 0 for i in range(ns.ndim))] = 0
-    inds = list(reversed(np.meshgrid(*map(np.arange, args.shape), sparse=True)))
-    inds.insert(axis, args)
-
-    arg = (arg + offsets)[tuple(inds)]
-    vals = vals[tuple(inds)]
-    n = ns.sum(axis=axis).take(0, 0)
-    return arg, vals, n
-
-
-def arg_chunk(func, argfunc, x, axis=None, **kwargs):
-    axis = axis[0] if isinstance(axis, tuple) else axis
-    vals = func(x, axis=axis, keepdims=True)
-    arg = argfunc(x, axis=axis, keepdims=True)
+    if axis is None:
+        local_args = argfunc(vals, axis=axis, keepdims=keepdims)
+        vals = vals.ravel()[local_args]
+        arg = arg.ravel()[local_args]
+    else:
+        local_args = argfunc(vals, axis=axis)
+        inds = np.ogrid[tuple(map(slice, local_args.shape))]
+        inds.insert(axis, local_args)
+        vals = vals[inds]
+        arg = arg[inds]
+        if keepdims:
+            vals = np.expand_dims(vals, axis)
+            arg = np.expand_dims(arg, axis)
+    return arg, vals
+
+
+def arg_chunk(func, argfunc, x, axis, offset_info):
+    arg_axis = None if len(axis) == x.ndim or x.ndim == 1 else axis[0]
+    vals = func(x, axis=arg_axis, keepdims=True)
+    arg = argfunc(x, axis=arg_axis, keepdims=True)
+    if arg_axis is None:
+        offset, total_shape = offset_info
+        ind = np.unravel_index(arg.ravel()[0], x.shape)
+        total_ind = tuple(o + i for (o, i) in zip(offset, ind))
+        arg[:] = np.ravel_multi_index(total_ind, total_shape)
+    else:
+        arg += offset_info
+
     result = np.empty(shape=vals.shape, dtype=[('vals', vals.dtype),
-                                               ('arg', arg.dtype),
-                                               ('n', 'i8')])
+                                               ('arg', arg.dtype)])
     result['vals'] = vals
     result['arg'] = arg
-    result['n'] = x.shape[axis]
     return result
 
 
 def arg_combine(func, argfunc, data, axis=None, **kwargs):
-    axis = axis[0] if isinstance(axis, tuple) else axis
-    arg, vals, n = _arg_combine(data, axis, argfunc)
-    shape = tuple(s if i != axis else 1 for (i, s) in enumerate(data.shape))
-    result = np.empty(shape=shape, dtype=[('vals', vals.dtype),
-                                          ('arg', arg.dtype),
-                                          ('n', 'i8')])
-    result['vals'] = vals.reshape(shape)
-    result['arg'] = arg.reshape(shape)
-    result['n'] = n
+    arg, vals = _arg_combine(data, axis, argfunc, keepdims=True)
+    result = np.empty(shape=vals.shape, dtype=[('vals', vals.dtype),
+                                               ('arg', arg.dtype)])
+    result['vals'] = vals
+    result['arg'] = arg
     return result
 
 
 def arg_agg(func, argfunc, data, axis=None, **kwargs):
-    axis = axis[0] if isinstance(axis, tuple) else axis
-    return _arg_combine(data, axis, argfunc)[0]
+    return _arg_combine(data, axis, argfunc, keepdims=False)[0]
+
+
+def arg_reduction(x, chunk, combine, agg, axis=None, split_every=None):
+    """Generic function for argreduction.
+
+    Parameters
+    ----------
+    x : Array
+    chunk : callable
+        Partialed ``arg_chunk``.
+    combine : callable
+        Partialed ``arg_combine``.
+    agg : callable
+        Partialed ``arg_agg``.
+    axis : int, optional
+    split_every : int or dict, optional
+    """
+    if axis is None:
+        axis = tuple(range(x.ndim))
+        ravel = True
+    elif isinstance(axis, int):
+        if axis < 0:
+            axis += x.ndim
+        if axis < 0 or axis >= x.ndim:
+            raise ValueError("axis entry is out of bounds")
+        axis = (axis,)
+        ravel = x.ndim == 1
+    else:
+        raise TypeError("axis must be either `None` or int, "
+                        "got '{0}'".format(axis))
+
+    # Map chunk across all blocks
+    name = 'arg-reduce-chunk-{0}'.format(tokenize(chunk, axis))
+    old = x.name
+    keys = list(product(*map(range, x.numblocks)))
+    offsets = list(product(*(accumulate(operator.add, bd[:-1], 0)
+                             for bd in x.chunks)))
+    if ravel:
+        offset_info = zip(offsets, repeat(x.shape))
+    else:
+        offset_info = pluck(axis[0], offsets)
+
+    chunks = tuple((1,)*len(c) if i in axis else c for (i, c)
+                   in enumerate(x.chunks))
+    dsk = dict(((name,) + k, (chunk, (old,) + k, axis, off)) for (k, off)
+               in zip(keys, offset_info))
+    tmp = Array(merge(dsk, x.dask), name, chunks)
+    return _tree_reduce(tmp, agg, axis, False, np.int64, split_every, combine)
+
 
+def make_arg_reduction(func, argfunc):
+    """Create a argreduction callable.
 
-def arg_reduction(func, argfunc):
+    Parameters
+    ----------
+    func : callable
+        The reduction (e.g. ``min``)
+    argfunc : callable
+        The argreduction (e.g. ``argmin``)
+    """
     chunk = partial(arg_chunk, func, argfunc)
-    agg = partial(arg_agg, func, argfunc)
     combine = partial(arg_combine, func, argfunc)
+    agg = partial(arg_agg, func, argfunc)
     @wraps(argfunc)
-    def _(a, axis=None, split_every=None):
-        if axis < 0:
-            axis = a.ndim + axis
-        return reduction(a, chunk, agg, axis=axis, dtype='i8',
-                         split_every=split_every, combine=combine)
+    def _(x, axis=None, split_every=None):
+        return arg_reduction(x, chunk, combine, agg, axis, split_every)
     return _
 
 
-argmin = arg_reduction(chunk.min, chunk.argmin)
-argmax = arg_reduction(chunk.max, chunk.argmax)
-nanargmin = arg_reduction(chunk.nanmin, chunk.nanargmin)
-nanargmax = arg_reduction(chunk.nanmax, chunk.nanargmax)
+argmin = make_arg_reduction(chunk.min, chunk.argmin)
+argmax = make_arg_reduction(chunk.max, chunk.argmax)
+nanargmin = make_arg_reduction(chunk.nanmin, chunk.nanargmin)
+nanargmax = make_arg_reduction(chunk.nanmax, chunk.nanargmax)
 
 
 def cumreduction(func, binop, ident, x, axis, dtype=None):

dask.array.argmin fails on 3D input
```
In [29]: da.from_array(np.random.randn(2, 3, 4), chunks=(2, 3, 4)).argmin(axis=0).compute()
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-29-b25ac117010d> in <module>()
----> 1 da.from_array(np.random.randn(2, 3, 4), chunks=(2, 3, 4)).argmin(axis=0).compute()

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/base.py in compute(self, **kwargs)
     35
     36     def compute(self, **kwargs):
---> 37         return compute(self, **kwargs)[0]
     38
     39     @classmethod

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/base.py in compute(*args, **kwargs)
    108                 for opt, val in groups.items()])
    109     keys = [var._keys() for var in variables]
--> 110     results = get(dsk, keys, **kwargs)
    111
    112     results_iter = iter(results)

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/threaded.py in get(dsk, result, cache, num_workers, **kwargs)
     55     results = get_async(pool.apply_async, len(pool._pool), dsk, result,
     56                         cache=cache, queue=queue, get_id=_thread_get_id,
---> 57                         **kwargs)
     58
     59     return results

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/async.py in get_async(apply_async, num_workers, dsk, result, cache, queue, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, **kwargs)
    479                 _execute_task(task, data)  # Re-execute locally
    480             else:
--> 481                 raise(remote_exception(res, tb))
    482         state['cache'][key] = res
    483         finish_task(dsk, key, state, results, keyorder.get)

IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (3,4) (4,1) (1,3)

Traceback
---------
  File "/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/async.py", line 264, in execute_task
    result = _execute_task(task, data)
  File "/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/async.py", line 246, in _execute_task
    return func(*args2)
  File "/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/toolz/functoolz.py", line 381, in __call__
    ret = f(ret)
  File "/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/array/reductions.py", line 450, in arg_agg
    return _arg_combine(data, axis, argfunc)[0]
  File "/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/dask/array/reductions.py", line 416, in _arg_combine
    arg = (arg + offsets)[tuple(inds)]
```
This was reported in xarray: https://github.com/pydata/xarray/issues/759
diff --git a/dask/array/tests/test_reductions.py b/dask/array/tests/test_reductions.py
index 9b13a98dc..7b734416f 100644
--- a/dask/array/tests/test_reductions.py
+++ b/dask/array/tests/test_reductions.py
@@ -73,16 +73,6 @@ def test_reductions_1D(dtype):
     reduction_1d_test(da.nanmin, a, np.nanmin, x, False)
     reduction_1d_test(da.nanmax, a, np.nanmax, x, False)
 
-    assert eq(da.argmax(a, axis=0), np.argmax(x, axis=0))
-    assert eq(da.argmin(a, axis=0), np.argmin(x, axis=0))
-    assert eq(da.nanargmax(a, axis=0), np.nanargmax(x, axis=0))
-    assert eq(da.nanargmin(a, axis=0), np.nanargmin(x, axis=0))
-
-    assert eq(da.argmax(a, axis=0, split_every=2), np.argmax(x, axis=0))
-    assert eq(da.argmin(a, axis=0, split_every=2), np.argmin(x, axis=0))
-    assert eq(da.nanargmax(a, axis=0, split_every=2), np.nanargmax(x, axis=0))
-    assert eq(da.nanargmin(a, axis=0, split_every=2), np.nanargmin(x, axis=0))
-
 
 def reduction_2d_test(da_func, darr, np_func, narr, use_dtype=True,
                       split_every=True):
@@ -144,23 +134,32 @@ def test_reductions_2D(dtype):
     reduction_2d_test(da.nanmin, a, np.nanmin, x, False)
     reduction_2d_test(da.nanmax, a, np.nanmax, x, False)
 
-    assert eq(da.argmax(a, axis=0), np.argmax(x, axis=0))
-    assert eq(da.argmin(a, axis=0), np.argmin(x, axis=0))
-    assert eq(da.nanargmax(a, axis=0), np.nanargmax(x, axis=0))
-    assert eq(da.nanargmin(a, axis=0), np.nanargmin(x, axis=0))
-    assert eq(da.argmax(a, axis=1), np.argmax(x, axis=1))
-    assert eq(da.argmin(a, axis=1), np.argmin(x, axis=1))
-    assert eq(da.nanargmax(a, axis=1), np.nanargmax(x, axis=1))
-    assert eq(da.nanargmin(a, axis=1), np.nanargmin(x, axis=1))
-
-    assert eq(da.argmax(a, axis=0, split_every=2), np.argmax(x, axis=0))
-    assert eq(da.argmin(a, axis=0, split_every=2), np.argmin(x, axis=0))
-    assert eq(da.nanargmax(a, axis=0, split_every=2), np.nanargmax(x, axis=0))
-    assert eq(da.nanargmin(a, axis=0, split_every=2), np.nanargmin(x, axis=0))
-    assert eq(da.argmax(a, axis=1, split_every=2), np.argmax(x, axis=1))
-    assert eq(da.argmin(a, axis=1, split_every=2), np.argmin(x, axis=1))
-    assert eq(da.nanargmax(a, axis=1, split_every=2), np.nanargmax(x, axis=1))
-    assert eq(da.nanargmin(a, axis=1, split_every=2), np.nanargmin(x, axis=1))
+
+@pytest.mark.parametrize(['dfunc', 'func'],
+        [(da.argmin, np.argmin), (da.argmax, np.argmax),
+         (da.nanargmin, np.nanargmin), (da.nanargmax, np.nanargmax)])
+def test_arg_reductions(dfunc, func):
+    x = np.random.random((10, 10, 10))
+    a = da.from_array(x, chunks=(3, 4, 5))
+
+    assert eq(dfunc(a), func(x))
+    assert eq(dfunc(a, 0), func(x, 0))
+    assert eq(dfunc(a, 1), func(x, 1))
+    assert eq(dfunc(a, 2), func(x, 2))
+    with set_options(split_every=2):
+        assert eq(dfunc(a), func(x))
+        assert eq(dfunc(a, 0), func(x, 0))
+        assert eq(dfunc(a, 1), func(x, 1))
+        assert eq(dfunc(a, 2), func(x, 2))
+
+    pytest.raises(ValueError, lambda: dfunc(a, 3))
+    pytest.raises(TypeError, lambda: dfunc(a, (0, 1)))
+
+    x2 = np.arange(10)
+    a2 = da.from_array(x2, chunks=3)
+    assert eq(dfunc(a2), func(x2))
+    assert eq(dfunc(a2, 0), func(x2, 0))
+    assert eq(dfunc(a2, 0, split_every=2), func(x2, 0))
 
 
 def test_reductions_2D_nans():

pip install -e .[complete]
parse_log_pytest
numpy>=1.16.0 pandas>=1.0.0 cloudpickle partd distributed s3fs toolz psutil pytables bokeh bcolz scipy h5py ipython
pytest
apt-get update apt-get install -y graphviz liblzma-dev
3.5
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiobotocore @ file:///opt/conda/conda-bld/aiobotocore_1643638228694/work
aiohttp @ file:///tmp/build/80754af9/aiohttp_1632748060317/work
aioitertools @ file:///tmp/build/80754af9/aioitertools_1607109665762/work
async-timeout==3.0.1
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
bcolz==1.2.1
bokeh @ file:///tmp/build/80754af9/bokeh_1620710048147/work
botocore @ file:///opt/conda/conda-bld/botocore_1642672735464/work
brotlipy==0.7.0
certifi==2021.5.30
cffi @ file:///tmp/build/80754af9/cffi_1625814693874/work
chardet @ file:///tmp/build/80754af9/chardet_1607706739153/work
click==8.0.3
cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1632508026186/work
contextvars==2.4
cryptography @ file:///tmp/build/80754af9/cryptography_1635366128178/work
cytoolz==0.11.0
-e git+https://github.com/dask/dask.git@09bda79a79acc261f31a446425efc5dd2fb42b9a#egg=dask
decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work
distributed @ file:///tmp/build/80754af9/distributed_1615054599257/work
fsspec @ file:///opt/conda/conda-bld/fsspec_1642510437511/work
h5py==2.10.0
HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work
idna @ file:///tmp/build/80754af9/idna_1637925883363/work
idna-ssl @ file:///tmp/build/80754af9/idna_ssl_1611752490495/work
immutables @ file:///tmp/build/80754af9/immutables_1628888996840/work
importlib-metadata==4.8.3
iniconfig==1.1.1
ipython @ file:///tmp/build/80754af9/ipython_1593447367857/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
jedi @ file:///tmp/build/80754af9/jedi_1606932572482/work
Jinja2 @ file:///opt/conda/conda-bld/jinja2_1647436528585/work
jmespath @ file:///Users/ktietz/demo/mc3/conda-bld/jmespath_1630583964805/work
locket==0.2.1
MarkupSafe @ file:///tmp/build/80754af9/markupsafe_1621528150516/work
mock @ file:///tmp/build/80754af9/mock_1607622725907/work
msgpack @ file:///tmp/build/80754af9/msgpack-python_1612287171716/work
multidict @ file:///tmp/build/80754af9/multidict_1607367768400/work
numexpr @ file:///tmp/build/80754af9/numexpr_1618853194344/work
numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1603483703303/work
olefile @ file:///Users/ktietz/demo/mc3/conda-bld/olefile_1629805411829/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.1.5
parso==0.7.0
partd @ file:///opt/conda/conda-bld/partd_1647245470509/work
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
Pillow @ file:///tmp/build/80754af9/pillow_1625670622947/work
pluggy==1.0.0
prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1633440160888/work
psutil @ file:///tmp/build/80754af9/psutil_1612297621795/work
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
py==1.11.0
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
Pygments @ file:///opt/conda/conda-bld/pygments_1644249106324/work
pyOpenSSL @ file:///opt/conda/conda-bld/pyopenssl_1643788558760/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
PySocks @ file:///tmp/build/80754af9/pysocks_1605305763431/work
pytest==7.0.1
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
pytz==2021.3
PyYAML==5.4.1
s3fs @ file:///opt/conda/conda-bld/s3fs_1643701468749/work
scipy @ file:///tmp/build/80754af9/scipy_1597686635649/work
six @ file:///tmp/build/80754af9/six_1644875935023/work
sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work
tables==3.6.1
tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work
tomli==1.2.3
toolz @ file:///tmp/build/80754af9/toolz_1636545406491/work
tornado @ file:///tmp/build/80754af9/tornado_1606942266872/work
traitlets @ file:///tmp/build/80754af9/traitlets_1632746497744/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3 @ file:///opt/conda/conda-bld/urllib3_1643638302206/work
wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work
wrapt==1.12.1
yarl @ file:///tmp/build/80754af9/yarl_1606939915466/work
zict==2.0.0
zipp==3.6.0

name: dask
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - aiobotocore=2.1.0=pyhd3eb1b0_0
  - aiohttp=3.7.4.post0=py36h7f8727e_2
  - aioitertools=0.7.1=pyhd3eb1b0_0
  - async-timeout=3.0.1=py36h06a4308_0
  - attrs=21.4.0=pyhd3eb1b0_0
  - backcall=0.2.0=pyhd3eb1b0_0
  - bcolz=1.2.1=py36h04863e7_0
  - blas=1.0=openblas
  - blosc=1.21.3=h6a678d5_0
  - bokeh=2.3.2=py36h06a4308_0
  - botocore=1.23.24=pyhd3eb1b0_0
  - brotlipy=0.7.0=py36h27cfd23_1003
  - bzip2=1.0.8=h5eee18b_6
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - cffi=1.14.6=py36h400218f_0
  - chardet=4.0.0=py36h06a4308_1003
  - click=8.0.3=pyhd3eb1b0_0
  - cloudpickle=2.0.0=pyhd3eb1b0_0
  - contextvars=2.4=py_0
  - cryptography=35.0.0=py36hd23ed53_0
  - cytoolz=0.11.0=py36h7b6447c_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - distributed=2021.3.0=py36h06a4308_0
  - freetype=2.12.1=h4a9f257_0
  - fsspec=2022.1.0=pyhd3eb1b0_0
  - giflib=5.2.2=h5eee18b_0
  - h5py=2.10.0=py36h7918eee_0
  - hdf5=1.10.4=hb1b8bf9_0
  - heapdict=1.0.1=pyhd3eb1b0_0
  - idna=3.3=pyhd3eb1b0_0
  - idna_ssl=1.1.0=py36h06a4308_0
  - immutables=0.16=py36h7f8727e_0
  - ipython=7.16.1=py36h5ca1d4c_0
  - ipython_genutils=0.2.0=pyhd3eb1b0_1
  - jedi=0.17.2=py36h06a4308_1
  - jinja2=3.0.3=pyhd3eb1b0_0
  - jmespath=0.10.0=pyhd3eb1b0_0
  - jpeg=9e=h5eee18b_3
  - lcms2=2.16=hb9589c4_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - lerc=4.0.0=h6a678d5_0
  - libdeflate=1.22=h5eee18b_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=7.5.0=ha8ba4b0_17
  - libgfortran4=7.5.0=ha8ba4b0_17
  - libgomp=11.2.0=h1234567_1
  - libopenblas=0.3.18=hf726d26_0
  - libpng=1.6.39=h5eee18b_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtiff=4.5.1=hffd6297_1
  - libwebp=1.2.4=h11a3e52_1
  - libwebp-base=1.2.4=h5eee18b_1
  - locket=0.2.1=py36h06a4308_1
  - lz4-c=1.9.4=h6a678d5_1
  - lzo=2.10=h7b6447c_2
  - markupsafe=2.0.1=py36h27cfd23_0
  - mock=4.0.3=pyhd3eb1b0_0
  - msgpack-python=1.0.2=py36hff7bd54_1
  - multidict=5.1.0=py36h27cfd23_2
  - ncurses=6.4=h6a678d5_0
  - numexpr=2.7.3=py36h4be448d_1
  - numpy=1.19.2=py36h6163131_0
  - numpy-base=1.19.2=py36h75fe3a5_0
  - olefile=0.46=pyhd3eb1b0_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pandas=1.1.5=py36ha9443f7_0
  - parso=0.7.0=py_0
  - partd=1.2.0=pyhd3eb1b0_1
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pillow=8.3.1=py36h5aabda8_0
  - pip=21.2.2=py36h06a4308_0
  - prompt-toolkit=3.0.20=pyhd3eb1b0_0
  - psutil=5.8.0=py36h27cfd23_1
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - pycparser=2.21=pyhd3eb1b0_0
  - pygments=2.11.2=pyhd3eb1b0_0
  - pyopenssl=22.0.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pysocks=1.7.1=py36h06a4308_0
  - pytables=3.6.1=py36h71ec239_0
  - python=3.6.13=h12debd9_1
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - pytz=2021.3=pyhd3eb1b0_0
  - pyyaml=5.4.1=py36h27cfd23_1
  - readline=8.2=h5eee18b_0
  - s3fs=2022.1.0=pyhd3eb1b0_0
  - scipy=1.5.2=py36habc2bb6_0
  - setuptools=58.0.4=py36h06a4308_0
  - six=1.16.0=pyhd3eb1b0_1
  - sortedcontainers=2.4.0=pyhd3eb1b0_0
  - sqlite=3.45.3=h5eee18b_0
  - tblib=1.7.0=pyhd3eb1b0_0
  - tk=8.6.14=h39e8969_0
  - toolz=0.11.2=pyhd3eb1b0_0
  - tornado=6.1=py36h27cfd23_0
  - traitlets=4.3.3=py36h06a4308_0
  - typing-extensions=4.1.1=hd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - urllib3=1.26.8=pyhd3eb1b0_0
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - wrapt=1.12.1=py36h7b6447c_1
  - xz=5.6.4=h5eee18b_1
  - yaml=0.2.5=h7b6447c_0
  - yarl=1.6.3=py36h27cfd23_0
  - zict=2.0.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - zstd=1.5.6=hc292b87_0
  - pip:
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - pluggy==1.0.0
      - py==1.11.0
      - pytest==7.0.1
      - tomli==1.2.3
      - zipp==3.6.0
prefix: /opt/conda/envs/dask

dask/array/tests/test_reductions.py::test_arg_reductions[argmin-argmin] dask/array/tests/test_reductions.py::test_arg_reductions[argmax-argmax] dask/array/tests/test_reductions.py::test_arg_reductions[nanargmin-nanargmin] dask/array/tests/test_reductions.py::test_arg_reductions[nanargmax-nanargmax]
dask/array/tests/test_reductions.py::test_reductions_2D[f4] dask/array/tests/test_reductions.py::test_reductions_2D[i4]
dask/array/tests/test_reductions.py::test_reductions_1D[f4] dask/array/tests/test_reductions.py::test_reductions_1D[i4] dask/array/tests/test_reductions.py::test_reductions_2D_nans dask/array/tests/test_reductions.py::test_moment dask/array/tests/test_reductions.py::test_reductions_with_negative_axes dask/array/tests/test_reductions.py::test_nan dask/array/tests/test_reductions.py::test_0d_array dask/array/tests/test_reductions.py::test_reduction_on_scalar dask/array/tests/test_reductions.py::test_tree_reduce_depth dask/array/tests/test_reductions.py::test_tree_reduce_set_options
dask/array/reductions.py
dask/array/reductions.py