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: Smaller datasets have the potential to cause issues with the data
  adaptive methods, especially the FD method. All bin numbers have been
  precalculated.
docstr_tok: ["Smaller","datasets","have","the","potential","to","cause","issues","with","the","data","adaptive","methods",",","especially","the","FD","method",".","All","bin","numbers","have","been","precalculated","."]
code: def test_small(self):
      """
      Smaller datasets have the potential to cause issues with the data
      adaptive methods, especially the FD method. All bin numbers have been
      precalculated.
      """
      small_dat = {
          1: {
              "fd": 1,
              "scott": 1,
              "rice": 1,
              "sturges": 1,
              "doane": 1,
              "sqrt": 1,
              "stone": 1,
          },
          2: {
              "fd": 2,
              "scott": 1,
              "rice": 3,
              "sturges": 2,
              "doane": 1,
              "sqrt": 2,
              "stone": 1,
          },
          3: {
              "fd": 2,
              "scott": 2,
              "rice": 3,
              "sturges": 3,
              "doane": 3,
              "sqrt": 2,
              "stone": 1,
          },
      }
  
      for testlen, expectedResults in small_dat.items():
          testdat = np.arange(testlen)
          for estimator, expbins in expectedResults.items():
              a, b = np.histogram(testdat, estimator)
              assert_equal(
                  len(a),
                  expbins,
                  err_msg=f"For the {estimator} estimator "
                  f"with datasize of {testlen}",
              )
  
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 3 for calling the TestHistogramOptimBinNums obj's underlying member method code with example usage: obj.test_small() without return types