code: def test_str(self):
      rvals = [0, 1, -1, np.inf, -np.inf, np.nan]
      cvals = [complex(rp, ip) for rp in rvals for ip in rvals]
      dtypes = [np.complex64, np.cdouble, np.clongdouble]
      actual = [str(np.array([c], dt)) for c in cvals for dt in dtypes]
      wanted = [
          "[0.+0.j]",
          "[0.+0.j]",
          "[0.+0.j]",
          "[0.+1.j]",
          "[0.+1.j]",
          "[0.+1.j]",
          "[0.-1.j]",
          "[0.-1.j]",
          "[0.-1.j]",
          "[0.+infj]",
          "[0.+infj]",
          "[0.+infj]",
          "[0.-infj]",
          "[0.-infj]",
          "[0.-infj]",
          "[0.+nanj]",
          "[0.+nanj]",
          "[0.+nanj]",
          "[1.+0.j]",
          "[1.+0.j]",
          "[1.+0.j]",
          "[1.+1.j]",
          "[1.+1.j]",
          "[1.+1.j]",
          "[1.-1.j]",
          "[1.-1.j]",
          "[1.-1.j]",
          "[1.+infj]",
          "[1.+infj]",
          "[1.+infj]",
          "[1.-infj]",
          "[1.-infj]",
          "[1.-infj]",
          "[1.+nanj]",
          "[1.+nanj]",
          "[1.+nanj]",
          "[-1.+0.j]",
          "[-1.+0.j]",
          "[-1.+0.j]",
          "[-1.+1.j]",
          "[-1.+1.j]",
          "[-1.+1.j]",
          "[-1.-1.j]",
          "[-1.-1.j]",
          "[-1.-1.j]",
          "[-1.+infj]",
          "[-1.+infj]",
          "[-1.+infj]",
          "[-1.-infj]",
          "[-1.-infj]",
          "[-1.-infj]",
          "[-1.+nanj]",
          "[-1.+nanj]",
          "[-1.+nanj]",
          "[inf+0.j]",
          "[inf+0.j]",
          "[inf+0.j]",
          "[inf+1.j]",
          "[inf+1.j]",
          "[inf+1.j]",
          "[inf-1.j]",
          "[inf-1.j]",
          "[inf-1.j]",
          "[inf+infj]",
          "[inf+infj]",
          "[inf+infj]",
          "[inf-infj]",
          "[inf-infj]",
          "[inf-infj]",
          "[inf+nanj]",
          "[inf+nanj]",
          "[inf+nanj]",
          "[-inf+0.j]",
          "[-inf+0.j]",
          "[-inf+0.j]",
          "[-inf+1.j]",
          "[-inf+1.j]",
          "[-inf+1.j]",
          "[-inf-1.j]",
          "[-inf-1.j]",
          "[-inf-1.j]",
          "[-inf+infj]",
          "[-inf+infj]",
          "[-inf+infj]",
          "[-inf-infj]",
          "[-inf-infj]",
          "[-inf-infj]",
          "[-inf+nanj]",
          "[-inf+nanj]",
          "[-inf+nanj]",
          "[nan+0.j]",
          "[nan+0.j]",
          "[nan+0.j]",
          "[nan+1.j]",
          "[nan+1.j]",
          "[nan+1.j]",
          "[nan-1.j]",
          "[nan-1.j]",
          "[nan-1.j]",
          "[nan+infj]",
          "[nan+infj]",
          "[nan+infj]",
          "[nan-infj]",
          "[nan-infj]",
          "[nan-infj]",
          "[nan+nanj]",
          "[nan+nanj]",
          "[nan+nanj]",
      ]
  
      for res, val in zip(actual, wanted):
          assert_equal(res, val)
  
imports: import sys
  import gc
  from hypothesis import given
  from hypothesis.extra import numpy
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_warns, HAS_REFCOUNT, assert_raises_regex
  from numpy.core.arrayprint import _typelessdata
  import textwrap
label_desc: Use image node_id 1 for calling the TestComplexArray obj's underlying member method code with example usage: obj.test_str() without return types