code: def test_skewt():
      skewt = ACSkewT_gen()
      x = [-2, -1, -0.5, 0, 1, 2]
      # noquote(sprintf("%.15e,", dst(c(-2,-1, -0.5,0,1,2), shape=10)))
      # default in R:sn is df=inf
      pdf_r = np.array(
          [
              2.973416551551523e-90,
              3.687562713971017e-24,
              2.018401586422970e-07,
              3.989422804014327e-01,
              4.839414490382867e-01,
              1.079819330263761e-01,
          ]
      )
      pdf_st = skewt.pdf(x, 1000000, 10)
      pass
      np.allclose(pdf_st, pdf_r, rtol=0, atol=1e-6)
      np.allclose(pdf_st, pdf_r, rtol=1e-1, atol=0)
  
      # noquote(sprintf("%.15e,", pst(c(-2,-1, -0.5,0,1,2), shape=10)))
      cdf_r = np.array(
          [
              0.000000000000000e00,
              0.000000000000000e00,
              3.729478836866917e-09,
              3.172551743055357e-02,
              6.826894921370859e-01,
              9.544997361036416e-01,
          ]
      )
      cdf_st = skewt.cdf(x, 1000000, 10)
      np.allclose(cdf_st, cdf_r, rtol=0, atol=1e-6)
      np.allclose(cdf_st, cdf_r, rtol=1e-1, atol=0)
      # assert_(np.allclose(cdf_st, cdf_r, rtol=1e-13, atol=1e-15))
  
      # noquote(sprintf("%.15e,", dst(c(-2,-1, -0.5,0,1,2), shape=10, df=5)))
      pdf_r = np.array(
          [
              2.185448836190663e-07,
              1.272381597868587e-05,
              5.746937644959992e-04,
              3.796066898224945e-01,
              4.393468708859825e-01,
              1.301804021075493e-01,
          ]
      )
      pdf_st = skewt.pdf(x, 5, 10)  # args = (df, alpha)
      assert_(np.allclose(pdf_st, pdf_r, rtol=1e-13, atol=1e-25))
  
      # noquote(sprintf("%.15e,", pst(c(-2,-1, -0.5,0,1,2), shape=10, df=5)))
      cdf_r = np.array(
          [
              8.822783669199699e-08,
              2.638467463775795e-06,
              6.573106017198583e-05,
              3.172551743055352e-02,
              6.367851708183412e-01,
              8.980606093979784e-01,
          ]
      )
      cdf_st = skewt.cdf(x, 5, 10)  # args = (df, alpha)
      assert_(np.allclose(cdf_st, cdf_r, rtol=1e-10, atol=0))
  
      # noquote(sprintf("%.15e,", dst(c(-2,-1, -0.5,0,1,2), shape=10, df=1)))
      pdf_r = np.array(
          [
              3.941955996757291e-04,
              1.568067236862745e-03,
              6.136996029432048e-03,
              3.183098861837907e-01,
              3.167418189469279e-01,
              1.269297588738406e-01,
          ]
      )
      pdf_st = skewt.pdf(x, 1, 10)  # args = (df, alpha) = (1, 10))
      assert_(np.allclose(pdf_st, pdf_r, rtol=1e-13, atol=1e-25))
  
      # noquote(sprintf("%.15e,", pst(c(-2,-1, -0.5,0,1,2), shape=10, df=1)))
      cdf_r = np.array(
          [
              7.893671370544414e-04,
              1.575817262600422e-03,
              3.128720749105560e-03,
              3.172551743055351e-02,
              5.015758172626005e-01,
              7.056221318361879e-01,
          ]
      )
      cdf_st = skewt.cdf(x, 1, 10)  # args = (df, alpha) = (1, 10)
      assert_(np.allclose(cdf_st, cdf_r, rtol=1e-13, atol=1e-25))
  
imports: import numpy
  from numpy.testing import assert_, assert_almost_equal
  from statsmodels.sandbox.distributions.extras import skewnorm, skewnorm2, ACSkewT_gen
label_desc: Use image node_id 2 for calling a global function with example usage: test_skewt() without return types