Skip to main content

Platea

Platea is a passion project of mine. While working to optimize code for my day job as a Data Scientist, I began exploring the wonderful worlds of C++ and Fortran. I became very interested in learning how to implement numerical methods at a low level and in a performant manner. This code is a product of that work.

I'm open to all questions, feedback, commentary, and suggestions as long as they are constructive and polite! Discussions should always come in the form of git issues.

One of the big design philosophy differences between this package and packages like numpy is that this package is not made to be fool proof. For example, there are functions where we assume that users will read the docs and input appropriate arguments. We have intentionally left out assertions to check if these arguments conform to the docs. This reduces run times, but it also removes a safety net that many python users rely on.

Authors

James Montgomery - Initial work - jamesmontgomery.us

License

This project is licensed under the MIT License - see the LICENSE.md file for details

The name Platea

Why name a statistics package Platea? In addition to being a stats nerd I am also a history wonk. When writing this package I was reminded of a story in Thucydides' "History of the Peloponnesian War" where the Athenians needed to estimate the height of the walls surrounding Platea in order to know how high to make their siege ladders. The Athenians counted the number of bricks at a number of unplastered sections of wall and used the mode of these counts and the estimated height of a brick to approximate the height of the walls. This is one of the earliest recorded applications of "statistics" (5th Century BC).

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

For a local installation, first git clone this repository. Then follow these instructions:

pip install .

To install from pypi:

pip install -U platea

Testing

Testing is an important part of creating maintainable, production grade code. Below are instructions for running unit and style tests as well as installing the necessary testing packages. Tests have intentionally been separated from the installable pypi package for a variety of reasons.

Make sure you have the required testing packages:

pip install -r requirements_test.txt

You will also need to build the package extensions in place:

python setup.py build_ext --inplace

Running the unit tests

We use the pytest framework for unit testing.

pytest -vvl -s --cov platea --disable-pytest-warnings

Running the style tests

Having neat and legible code is important. Having documentation is also important. We use pylint as our style guide framework. Many of our naming conventions follow directly from the literary sources they come from. This makes it easier to read the mathematical equations and see how they translate into the code. This sometimes forces us to break pep8 conventions for naming.

pylint platea --disable=invalid-name

Acknowledgments

A big thank you to Keegan Hines who first recommended the book "Numerical Recipes" to me. Another big thank you to Mack Sweeney who has shaped much of my appreciation for code styling and standards. Finally, thanks to Greg Sinclair for being a sounding board and source of advice as I worked on this package.

Literary References

Book References:

  1. Numerical Recipes in Fortran Second Edition
  2. Numerical Recipes in Fortran 90 Second Edition
  3. Numerical Recipes in C Second Edition
  4. Numerical Recipes in C Third Edition

Metadata

Release files for platea 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for platea 0.3
File Size Uploaded Provenance Actions
platea-0.3.tar.gz 33.8 kB Without provenance Details for platea-0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for platea 0.3
File Interpreter ABI Platform Actions
platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details for platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl

Total release size: 224.1 kB

Release files / platea-0.3.tar.gz

Download URL platea-0.3.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2746ba987d3bd93279a775c614dadf171b7f6b434bc86cb61d2b58f3a42dae03
BLAKE2b-256 checksum
How to use checksums
4be67b6ccd53edb7a06d2589c614958bc223f9f2c627f3897059abdf19ba1636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.8.0 tqdm/4.40.2 CPython/3.7.5

Release files / platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl
Size 190.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
e7a599c51661d7a3e37c1c07b979f5e1b94a22a17583d6980c1b17e9016d1dbf
BLAKE2b-256 checksum
How to use checksums
9745972bc2ebccf39dd327ef4f4403bf0c8fe82273adb7ea2c77ebc41414dc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.8.0 tqdm/4.40.2 CPython/3.7.5

Security for platea 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

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