code: def test_array_newton_complex(self):
      def f(x):
          return x + 1 + 1j
  
      def fprime(x):
          return 1.0
  
      t = np.full(4, 1j)
      x = zeros.newton(f, t, fprime=fprime)
      assert_allclose(f(x), 0.0)
  
      # should work even if x0 is not complex
      t = np.ones(4)
      x = zeros.newton(f, t, fprime=fprime)
      assert_allclose(f(x), 0.0)
  
      x = zeros.newton(f, t)
      assert_allclose(f(x), 0.0)
  
imports: import pytest
  from math import sqrt, exp, sin, cos
  from functools import lru_cache
  from numpy.testing import assert_warns, assert_, assert_allclose, assert_equal, assert_array_equal, suppress_warnings
  import numpy
  from numpy import finfo, power, nan, isclose
  from scipy.optimize import zeros, newton, root_scalar
  from scipy._lib._util import getfullargspec_no_self
  from scipy.optimize._tstutils import get_tests, functions, fstrings
label_desc: Use image node_id 26 for calling the TestBasic obj's underlying member method code with example usage: obj.test_array_newton_complex() and returns: unknown, int