class_docstr: Some of the sparsetools routines use dense 2D matrices whose
  total size is not bounded by the nnz of the sparse matrix. These
  routines used to suffer from int32 wraparounds; here, we try to
  check that the wraparounds don't occur any more.
class_docstr_tok: ["Some","of","the","sparsetools","routines","use","dense","2D","matrices","whose","total","size","is","not","bounded","by","the","nnz","of","the","sparse","matrix",".","These","routines","used","to","suffer","from","int32","wraparounds",";","here",",","we","try","to","check","that","the","wraparounds","do","n't","occur","any","more","."]
code: def test_coo_todense(self):
      # Check *_todense routines (cf. gh-2179)
      #
      # All of them in the end call coo_matrix.todense
  
      n = self.n
  
      i = np.array([0, n - 1])
      j = np.array([0, n - 1])
      data = np.array([1, 2], dtype=np.int8)
      m = coo_matrix((data, (i, j)))
  
      r = m.todense()
      assert_equal(r[0, 0], 1)
      assert_equal(r[-1, -1], 2)
      del r
      gc.collect()
  
imports: from __future__ import division, print_function, absolute_import
  import sys
  import os
  import gc
  import threading
  import numpy
  from numpy.testing import assert_equal, assert_, assert_allclose
  from scipy.sparse import _sparsetools, coo_matrix, csr_matrix, csc_matrix, bsr_matrix, dia_matrix
  from scipy.sparse.sputils import supported_dtypes, matrix
  from scipy._lib._testutils import check_free_memory
  import pytest
  from pytest import raises
label_desc: Use image node_id 3 for calling the TestInt32Overflow obj's underlying member method code with example usage: obj.test_coo_todense() without return types