code: def test_newton_does_not_modify_x0(self):
      # https://github.com/scipy/scipy/issues/9964
      x0 = np.array([0.1, 3])
      x0_copy = x0.copy()  # Copy to test for equality.
      newton(np.sin, x0, np.cos)
      assert_array_equal(x0, x0_copy)
  
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 33 for calling the TestBasic obj's underlying member method code with example usage: obj.test_newton_does_not_modify_x0() without return types