Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Compute generalised second order Stirling numbers

Project Description


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.


An instance of the class ``STable`` provides access to (pre-calculated)
generalized Stirling numbers of the second kind, :math:`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

This version
History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting