class_docstr: Test getting and setting global print options.
class_docstr_tok: ["Test","getting","and","setting","global","print","options","."]
code: def test_precision_zero(self):
      np.set_printoptions(precision=0)
      for values, string in (
          ([0.0], "0."),
          ([0.3], "0."),
          ([-0.3], "-0."),
          ([0.7], "1."),
          ([1.5], "2."),
          ([-1.5], "-2."),
          ([-15.34], "-15."),
          ([100.0], "100."),
          ([0.2, -1, 122.51], "  0.,  -1., 123."),
          ([0], "0"),
          ([-12], "-12"),
          ([complex(0.3, -0.7)], "0.-1.j"),
      ):
          x = np.array(values)
          assert_equal(repr(x), "array([%s])" % string)
  
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 4 for calling the TestPrintOptions obj's underlying member method code with example usage: obj.test_precision_zero() without return types