class_docstr: Provide test coverage when using provided estimators for optimal number of
  bins
class_docstr_tok: ["Provide","test","coverage","when","using","provided","estimators","for","optimal","number","of","bins"]
docstr: Check when IQR is 0, but variance exists, we return the sturges value
  and not the fd value.
docstr_tok: ["Check","when","IQR","is","0",",","but","variance","exists",",","we","return","the","sturges","value","and","not","the","fd","value","."]
code: def test_limited_variance(self):
      """
      Check when IQR is 0, but variance exists, we return the sturges value
      and not the fd value.
      """
      lim_var_data = np.ones(1000)
      lim_var_data[:3] = 0
      lim_var_data[-4:] = 100
  
      edges_auto = histogram_bin_edges(lim_var_data, "auto")
      # assert_equal(edges_auto, np.linspace(0, 100, 12))
      assert_allclose(edges_auto, np.linspace(0, 100, 12), rtol=1e-15)
  
      edges_fd = histogram_bin_edges(lim_var_data, "fd")
      # assert_equal(edges_fd, np.array([0, 100]))
      assert_allclose(edges_fd, np.array([0, 100]), rtol=1e-15)
  
      edges_sturges = histogram_bin_edges(lim_var_data, "sturges")
      # assert_equal(edges_sturges, np.linspace(0, 100, 12))
      assert_allclose(
          edges_sturges, np.linspace(0, 100, 12), rtol=1e-15
      )
  
imports: import functools
  from unittest import expectedFailure, skipIf
  from pytest import raises
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, slowTest, TEST_WITH_TORCHDYNAMO, TestCase, xpassIfTorchDynamo
label_desc: Use image node_id 6 for calling the TestHistogramOptimBinNums obj's underlying member method code with example usage: obj.test_limited_variance() without return types