code: def test_non_finite_inputs_and_int_bins(self):
      # if either `values` or `sample` contain np.inf or np.nan throw
      # see issue gh-9010 for more
      x = self.x
      u = self.u
      orig = u[0]
      u[0] = np.inf
      assert_raises(ValueError, binned_statistic, u, x, "std", bins=10)
      # need to test for non-python specific ints, e.g. np.int8, np.int64
      assert_raises(
          ValueError, binned_statistic, u, x, "std", bins=np.int64(10)
      )
      u[0] = np.nan
      assert_raises(
          ValueError, binned_statistic, u, x, "count", bins=10
      )
      # replace original value, u belongs the class
      u[0] = orig
  
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from pytest import raises
  from scipy.stats import binned_statistic, binned_statistic_2d, binned_statistic_dd
  from scipy._lib._util import check_random_state
  from .common_tests import check_named_results
label_desc: Use image node_id 6 for calling the TestBinnedStatistic obj's underlying member method code with example usage: obj.test_non_finite_inputs_and_int_bins() without return types