code: def test_argmax(self, spcreator):
      D1 = np.array([-1, 5, 2, 3])
      D2 = np.array([0, 0, -1, -2])
      D3 = np.array([-1, -2, -3, -4])
      D4 = np.array([1, 2, 3, 4])
      D5 = np.array([1, 2, 0, 0])
  
      for D in [D1, D2, D3, D4, D5]:
          mat = spcreator(D)
  
          assert_equal(mat.argmax(), np.argmax(D))
          assert_equal(mat.argmin(), np.argmin(D))
  
          assert_equal(mat.argmax(axis=0), np.argmax(D, axis=0))
          assert_equal(mat.argmin(axis=0), np.argmin(D, axis=0))
  
      D6 = np.empty((0,))
  
      for axis in [None, 0]:
          mat = spcreator(D6)
          with pytest.raises(ValueError, match="to an empty matrix"):
              mat.argmin(axis=axis)
          with pytest.raises(ValueError, match="to an empty matrix"):
              mat.argmax(axis=axis)
  
file_path: scipy/scipy/sparse/tests/test_minmax1d.py
imports: import pytest
  import numpy
  from numpy.testing import assert_equal, assert_array_equal
  from scipy.sparse import coo_array
  from scipy.sparse._sputils import isscalarlike
label_desc: Use image node_id 4 for calling the Test_MinMaxMixin1D obj's underlying member method code with example usage: obj.test_argmax(spcreator) without return types