Skip to main content

A set of tools and utilities for extending common libraries and providing parallel capabilities.

Project description

mpctools

A set of python tools for extending standard (and non-standard) libraries. These originated from my own needs and those of my students, and I decided to put them here in case they may be useful to other people.

Features

The library currently contains the following two packages:

  1. extensions: A number of extensions to numpy, sklearn, pandas and matplotlib, as well as general-purpose utilities.
  2. parallel: A set of tools for wrapping pathos multiprocessing in a simple easy to use interface with multiple parallel workers.

More details for each library are provided as doxygen-style comments in the modules.

Setting up

Requirements

This Library has the following dependencies:

  • opencv-python
  • scikit-learn
  • matplotlib
  • deprecated
  • lapsolver
  • hotelling
  • seaborn
  • pandas
  • pathos
  • scipy
  • numpy
  • numba

In most cases, the above can be automatically installed through the library itself (i.e. pip will attempt to download them). If this causes issues, or you wish to install specific versions (such as building opencv from source), you can prevent dependency checking by passing the --no-deps flag.

Installing

The project is available on PyPi, and hence the latest (stable) release can be installed simply:

pip install mpctools [--no-deps]

Note that the --no-deps flag is optional (as described above).

Alternatively, you may choose to install directly from source. This has the added advantage that if you change any of the implementations, the changes will be reflected without having to rebuild. However, you will have to manually download the source (via git or just zipped and then extracted):

python setup.py build develop [--no-deps]

Known Issues

  • Python 3.7: parallel.IWorker - There seems to be an incompatibility in pathos with python 3.7, which is causing it to default to pickle rather than dill, and sometimes preventing abc-derived classes (namely the IWorker instance) from being pickled. If this happens to you, just make your worker a standard class and copy the initialiser and update_progress methods from IWorker. We are working on a solution to this.
  • parallel Blocking - If the program seems to hang for no reason, it could be that one of the child processes died maybe due to a memory overlow... if this happens, try to limit the amount of memory usage by each IWorker.

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

mpctools-0.14.0.tar.gz (80.7 kB view details)

Uploaded Source

Built Distribution

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

mpctools-0.14.0-py3-none-any.whl (92.0 kB view details)

Uploaded Python 3

File details

Details for the file mpctools-0.14.0.tar.gz.

File metadata

  • Download URL: mpctools-0.14.0.tar.gz
  • Upload date:
  • Size: 80.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for mpctools-0.14.0.tar.gz
Algorithm Hash digest
SHA256 8705f8c9ed9fa6c233a02fe512cf2bebee745e8e48c760adf993784acad65f75
MD5 29ff4c9df82379588ca0da16581873f5
BLAKE2b-256 217b36da57df06587ced394677fbc32f02343702ee8eeb20fc8f24d4317015d1

See more details on using hashes here.

File details

Details for the file mpctools-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: mpctools-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 92.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for mpctools-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2461c30f0b6117d2f0ae7e3ded6ad7505eeb0b9b16509d11ff8fd9ba5c602be4
MD5 ea9cb0b21e7606901b94aa27a58e32b7
BLAKE2b-256 ecfa14fa0da4777548adda62cc989cb3f2c59560373577fd386d21bfb2514e10

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