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 that methods handle no variance in data
  Primarily for Scott and FD as the SD and IQR are both 0 in this case
docstr_tok: ["Check","that","methods","handle","no","variance","in","data","Primarily","for","Scott","and","FD","as","the","SD","and","IQR","are","both","0","in","this","case"]
code: def test_novariance(self):
      """
      Check that methods handle no variance in data
      Primarily for Scott and FD as the SD and IQR are both 0 in this case
      """
      novar_dataset = np.ones(100)
      novar_resultdict = {
          "fd": 1,
          "scott": 1,
          "rice": 1,
          "sturges": 1,
          "doane": 1,
          "sqrt": 1,
          "auto": 1,
          "stone": 1,
      }
  
      for estimator, numbins in novar_resultdict.items():
          a, b = np.histogram(novar_dataset, estimator)
          assert_equal(
              len(a),
              numbins,
              err_msg="{0} estimator, "
              "No Variance test".format(estimator),
          )
  
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 5 for calling the TestHistogramOptimBinNums obj's underlying member method code with example usage: obj.test_novariance() without return types