code: def test_1d_row_and_col():
      res = coo_array([1, -2, -3])
      assert np.array_equal(res.col, np.array([0, 1, 2]))
      assert np.array_equal(res.row, np.zeros_like(res.col))
      assert res.row.dtype == res.col.dtype
  
      res.col = [1, 2, 3]
      assert len(res.indices) == 1
      assert np.array_equal(res.col, np.array([1, 2, 3]))
      assert res.row.dtype == res.col.dtype
  
      with pytest.raises(ValueError, match="cannot set row attribute"):
          res.row = [1, 2, 3]
  
imports: import numpy
  import pytest
  from scipy.sparse import coo_array
label_desc: Use image node_id 13 for calling a global function with example usage: test_1d_row_and_col() without return types