(p)
| 901 | return pdf, cdf, invcdf, support |
| 902 | |
| 903 | def _triweight_invcdf_estimate(p): |
| 904 | # A handrolled piecewise approximation. There is no magic here. |
| 905 | sign, p = (1.0, p) if p <= 1/2 else (-1.0, 1.0 - p) |
| 906 | x = (2.0 * p) ** 0.3400218741872791 - 1.0 |
| 907 | if 0.00001 < p < 0.499: |
| 908 | x -= 0.033 * sin(1.07 * tau * (p - 0.035)) |
| 909 | return x * sign |
| 910 | |
| 911 | @register('triweight') |
| 912 | def triweight_kernel(): |