Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Compute generalised second order Stirling numbers via libstb.

libstb “contains library routines that provide alternative ways of computing generalised second order Stirling numbers used in working with Pitman-Yor and Dirichlet processes (PYP and DP).” libstb is written by Wray Buntine.

Usage

An instance of the class STable provides access to (pre-calculated) generalized Stirling numbers of the second kind, \(S^n_{m,a}\). Initialize the table with the maximum n and maximum m which will be needed.

>>> import pystb
>>> stable = pystb.STable(10000, 10000, 0.5)
>>> stable.S(5, 3)  # S^5_{3, 0.5}
>>> stable[5, 3]  # alias for stable.S(5, 3)

Release history Release notifications | RSS feed

This release

0.1.1.dev7 This release

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page