code: def test_pdf_logpdf():
      np.random.seed(1)
      n_basesample = 50
      xn = np.random.randn(n_basesample)
  
      # Default
      gkde = stats.gaussian_kde(xn)
  
      xs = np.linspace(-15, 12, 25)
      pdf = gkde.evaluate(xs)
      pdf2 = gkde.pdf(xs)
      assert_almost_equal(pdf, pdf2, decimal=12)
  
      logpdf = np.log(pdf)
      logpdf2 = gkde.logpdf(xs)
      assert_almost_equal(logpdf, logpdf2, decimal=12)
  
      # There are more points than data
      gkde = stats.gaussian_kde(xs)
      pdf = np.log(gkde.evaluate(xn))
      pdf2 = gkde.logpdf(xn)
      assert_almost_equal(pdf, pdf2, decimal=12)
  
imports: from __future__ import division, print_function, absolute_import
  from scipy import stats
  import numpy
  from numpy.testing import assert_almost_equal, assert_, assert_array_almost_equal, assert_array_almost_equal_nulp, assert_allclose
  import pytest
  from pytest import raises
label_desc: Use image node_id 11 for calling a global function with example usage: test_pdf_logpdf() without return types