mrocklin: This looks good to me.  One final thing is that we might want to do is to add a regression test.  We might verify that the `.name` attribute of different calls differ.  Perhaps something like the following:

```python
assert da.argmin(x).name != da.argmin(x + 1).name
```
jakirkham: LGTM. Thanks @TAdeJong 😄
diff --git a/dask/array/creation.py b/dask/array/creation.py
index e953c5055..1ae0e518d 100644
--- a/dask/array/creation.py
+++ b/dask/array/creation.py
@@ -943,7 +943,7 @@ def pad_udf(array, pad_width, mode, **kwargs):
 
         result = result.map_blocks(
             wrapped_pad_func,
-            token="pad",
+            name="pad",
             dtype=result.dtype,
             pad_func=mode,
             iaxis_pad_width=pad_width[d],
diff --git a/dask/array/reductions.py b/dask/array/reductions.py
index f9b004664..b4020821e 100644
--- a/dask/array/reductions.py
+++ b/dask/array/reductions.py
@@ -614,7 +614,8 @@ def arg_reduction(x, chunk, combine, agg, axis=None, split_every=None, out=None)
                         "got '{0}'".format(axis))
 
     # Map chunk across all blocks
-    name = 'arg-reduce-chunk-{0}'.format(tokenize(chunk, axis))
+    name = 'arg-reduce-{0}'.format(tokenize(axis, x, chunk,
+                                            combine, split_every))
     old = x.name
     keys = list(product(*map(range, x.numblocks)))
     offsets = list(product(*(accumulate(operator.add, bd[:-1], 0)
@@ -714,7 +715,8 @@ def cumreduction(func, binop, ident, x, axis=None, dtype=None, out=None):
 
     m = x.map_blocks(func, axis=axis, dtype=dtype)
 
-    name = '%s-axis=%d-%s' % (func.__name__, axis, tokenize(x, dtype))
+    name = '{0}-{1}'.format(func.__name__, tokenize(func, axis, binop,
+                                                    ident, x, dtype))
     n = x.numblocks[axis]
     full = slice(None, None, None)
     slc = (full,) * axis + (slice(-1, None),) + (full,) * (x.ndim - axis - 1)

Stacking list of arg reduction's produces duplicates of last list element
This is weird. As I do often, I create a list of _n_ dask.arrays in a for-loop for a number of cases, and stack this together to one big dask array. However, if I stack together `da.argmin` operations, the array contains _n_ copies of the last argmin in the list. This does not happen for regular `da.min` or `da.sum`, but is does happen for `da.argmax`, so I suspect a issue in the general arg_reduction.

A reproduction example:

```python
import dask.array as da
import numpy as np
import matplotlib.pyplot as plt

Data = da.random.random((3,3,20,3), chunks=(3,1,-1,1))
minima = []
argminima = []
for index in range(Data.shape[-1]):
    minima.append(da.min(Data[...,index], axis=2))
    argminima.append(da.argmin(Data[...,index], axis=2))
    
fig,ax = plt.subplots(Data.shape[-1], 4, figsize=[9,6])
for index in range(Data.shape[-1]):
    ax[index,0].imshow(minima[index].compute())
    ax[index,1].imshow(argminima[index].compute())
minimb = da.stack(minima)
argminimb = da.stack(argminima)
for index in range(Data.shape[-1]):
    ax[index,2].imshow(minimb[index,:,:].compute())
    ax[index,3].imshow(argminimb[index,:,:].compute())
for i, text in enumerate(["min_before", "argmin_before", "min_after", "argmin_after"]):
    ax[0,i].set_title(text)
plt.show()
```
![image](https://user-images.githubusercontent.com/6816964/45033289-5c796080-b054-11e8-8362-53b6fa583cda.png)

Note how for `da.min` the data before and after stacking is the same, but different for each iteration, while for `da.argmin` after stacking all slices are the same.


diff --git a/dask/array/tests/test_reductions.py b/dask/array/tests/test_reductions.py
index 42afbbd4d..bfe54bf5f 100644
--- a/dask/array/tests/test_reductions.py
+++ b/dask/array/tests/test_reductions.py
@@ -6,7 +6,7 @@ np = pytest.importorskip('numpy')
 import dask.array as da
 from dask.array.utils import assert_eq as _assert_eq, same_keys
 from dask.core import get_deps
-from dask.context import set_options
+import dask.config as config
 
 
 def assert_eq(a, b):
@@ -139,7 +139,7 @@ def test_arg_reductions(dfunc, func):
     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):
+    with config.set(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))
@@ -368,7 +368,7 @@ def test_tree_reduce_depth():
 
 def test_tree_reduce_set_options():
     x = da.from_array(np.arange(242).reshape((11, 22)), chunks=(3, 4))
-    with set_options(split_every={0: 2, 1: 3}):
+    with config.set(split_every={0: 2, 1: 3}):
         assert_max_deps(x.sum(), 2 * 3)
         assert_max_deps(x.sum(axis=0), 2)
 
@@ -487,3 +487,14 @@ def test_topk_argtopk3():
               da.topk(a, 5, axis=1, split_every=2))
     assert_eq(a.argtopk(5, axis=1, split_every=2),
               da.argtopk(a, 5, axis=1, split_every=2))
+
+
+@pytest.mark.parametrize('func', [da.cumsum, da.cumprod,
+                                  da.argmin, da.argmax,
+                                  da.min, da.max,
+                                  da.nansum, da.nanmax])
+def test_regres_3940(func):
+    a = da.ones((5,2), chunks=(2,2))
+    assert func(a).name != func(a + 1).name
+    assert func(a, axis=0).name != func(a).name
+    assert func(a, axis=0).name != func(a, axis=1).name

pip install -e .[complete]
parse_log_pytest
pytest
pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
click==8.1.8
cloudpickle==2.2.1
-e git+https://github.com/dask/dask.git@92c8cba82e5e427f9acbdadcc6973a531466ae41#egg=dask
distributed==1.28.1
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
HeapDict==1.0.1
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
locket==1.0.0
msgpack==1.0.5
numpy==1.21.6
packaging @ file:///croot/packaging_1671697413597/work
pandas==1.3.5
partd==1.4.1
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
psutil==7.0.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pytest==7.1.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
six==1.17.0
sortedcontainers==2.4.0
tblib==2.0.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
toolz==0.12.1
tornado==6.2
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
zict==2.2.0
zipp @ file:///croot/zipp_1672387121353/work

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
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - click==8.1.8
      - cloudpickle==2.2.1
      - distributed==1.28.1
      - heapdict==1.0.1
      - locket==1.0.0
      - msgpack==1.0.5
      - numpy==1.21.6
      - pandas==1.3.5
      - partd==1.4.1
      - psutil==7.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tblib==2.0.0
      - toolz==0.12.1
      - tornado==6.2
      - zict==2.2.0
prefix: /opt/conda/envs/dask

dask/array/tests/test_reductions.py::test_regres_3940[argmin] dask/array/tests/test_reductions.py::test_regres_3940[argmax]
dask/array/tests/test_reductions.py::test_nan_object[nansum] dask/array/tests/test_reductions.py::test_nan_object[sum] dask/array/tests/test_reductions.py::test_nan_object[nanmin] dask/array/tests/test_reductions.py::test_nan_object[min] dask/array/tests/test_reductions.py::test_nan_object[nanmax] dask/array/tests/test_reductions.py::test_nan_object[max]
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_reduction_errors 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_nanarg_reductions[_nanargmin-nanargmin] dask/array/tests/test_reductions.py::test_nanarg_reductions[_nanargmax-nanargmax] 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_reductions_with_empty_array dask/array/tests/test_reductions.py::test_tree_reduce_depth dask/array/tests/test_reductions.py::test_tree_reduce_set_options dask/array/tests/test_reductions.py::test_reduction_names dask/array/tests/test_reductions.py::test_array_reduction_out[sum] dask/array/tests/test_reductions.py::test_array_reduction_out[argmax] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[None-cumsum] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[None-cumprod] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[0-cumsum] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[0-cumprod] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[1-cumsum] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[1-cumprod] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[-1-cumsum] dask/array/tests/test_reductions.py::test_array_cumreduction_axis[-1-cumprod] dask/array/tests/test_reductions.py::test_array_cumreduction_out[cumsum] dask/array/tests/test_reductions.py::test_array_cumreduction_out[cumprod] dask/array/tests/test_reductions.py::test_topk_argtopk1[None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk1[None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk1[2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk1[2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk1[4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk1[4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk1[8-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk1[8-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[1-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[2-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[3-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[4-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[5-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-None-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-None-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-2-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-2-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-3-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-3-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-4-sort-topk] dask/array/tests/test_reductions.py::test_topk_argtopk2[10-4-argsort-argtopk] dask/array/tests/test_reductions.py::test_topk_argtopk3 dask/array/tests/test_reductions.py::test_regres_3940[cumsum] dask/array/tests/test_reductions.py::test_regres_3940[cumprod] dask/array/tests/test_reductions.py::test_regres_3940[amin] dask/array/tests/test_reductions.py::test_regres_3940[amax] dask/array/tests/test_reductions.py::test_regres_3940[nansum] dask/array/tests/test_reductions.py::test_regres_3940[nanmax]
dask/array/creation.py dask/array/reductions.py
dask/array/creation.py dask/array/reductions.py