Skip to main content

A package for statistics and numeric methods.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

platea-0.3.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl (190.3 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file platea-0.3.tar.gz.

File metadata

  • Download URL: platea-0.3.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for platea-0.3.tar.gz
Algorithm Hash digest
SHA256 2746ba987d3bd93279a775c614dadf171b7f6b434bc86cb61d2b58f3a42dae03
MD5 e01ef53a7421fbbabb4aca95219c7758
BLAKE2b-256 4be67b6ccd53edb7a06d2589c614958bc223f9f2c627f3897059abdf19ba1636

See more details on using hashes here.

File details

Details for the file platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 190.3 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using 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

File hashes

Hashes for platea-0.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e7a599c51661d7a3e37c1c07b979f5e1b94a22a17583d6980c1b17e9016d1dbf
MD5 b495f82fb6df59db15686d3162e7e27a
BLAKE2b-256 9745972bc2ebccf39dd327ef4f4403bf0c8fe82273adb7ea2c77ebc41414dc16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page