class_docstr: Module level tests for all sktime distributions.
docstr: Test that the log of the pdf and log_pdf function are similar.
docstr_tok: ["Test","that","the","log","of","the","pdf","and","log_pdf","function","are","similar","."]
code: def test_log_pdf_and_pdf(self, estimator_instance):
      """Test that the log of the pdf and log_pdf function are similar."""
      d = estimator_instance
      capabilities_exact = d.get_tags()["capabilities:exact"]
  
      if (
          "log_pdf" not in capabilities_exact
          or "pdf" not in capabilities_exact
      ):
          return
      x = d.sample()
      pdf = d.pdf(x)
      log_pdf = d.log_pdf(x)
      assert np.allclose(np.log(pdf), log_pdf)
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import check_is_mtype
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils.index import random_ss_ix
label_desc: Use image node_id 7 for calling the TestAllDistributions obj's underlying member method code with example usage: obj.test_log_pdf_and_pdf(estimator_instance) without return types