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))
  
      edges_fd = histogram_bin_edges(lim_var_data, "fd")
      assert_equal(edges_fd, np.array([0, 100]))
  
      edges_sturges = histogram_bin_edges(lim_var_data, "sturges")
      assert_equal(edges_sturges, np.linspace(0, 100, 12))
  
imports: import numpy
  from numpy.lib.histograms import histogram, histogramdd, histogram_bin_edges
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, assert_allclose, assert_array_max_ulp, assert_raises_regex, suppress_warnings
  from numpy.testing._private.utils import requires_memory
  import pytest
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