[SciPy-Dev] Boost for stats

Nicholas McKibben nicholas.bgp at gmail.com
Fri Feb 12 16:50:22 EST 2021


Hi all,

Many stats distributions in SciPy have outstanding issues with difficult
solutions in legacy code.  We've been working on replacing existing
statistical distributions with those found in Boost.Math.  The initial
implementation resolves almost a dozen issues for scipy.stats with
potential for resolving several more in scipy.stats and scipy.special in
future PRs.

Initial PR: https://github.com/scipy/scipy/pull/1332
<https://github.com/scipy/scipy/pull/13328>
This PR includes the ability to easily add Boost functionality through
generated ufuncs.

Boost is a large library and would incur the cost of one of the follow
- an additional dependency (e,g, boostinator
https://github.com/mckib2/boostinator) that outsources the packaging of the
Boost libraries
- the inclusion of Boost within SciPy either as a "clone and own" or
submodule

The initial PR includes the zipped Boost headers only (~24MB zipped), but
adding Boost as a submodule might be a more maintainable approach if
changes to Boost need to be made in the future.

Inclusion of the entire Boost library is a virtual necessity for the
Boost.Math module. Manual attempts to strip away unnecessary files and bcp
(Boost's utility to provide stripped down installations) fail to create
smaller sizes.  The increase in size would be similar to the following:

SciPy master repo ~177 MB
Boost branch: ~221 MB

Built: ~939 MB
Built With Boost: ~1090 MB

Wheel size should not be significantly impacted because Boost is used as a
header-only library.

I have no relationship with the Boost libraries other than as a user and
bug reporter.  I find them to be impressive and well-maintained with
tremendous support from both industry and open source developers.  SciPy
would benefit from the efficient, well-tested and maintained
implementations of stats and special algorithms.

Thanks,
Nicholas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scipy-dev/attachments/20210212/f34e525b/attachment.html>


More information about the SciPy-Dev mailing list