Skip to main content

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.

Metadata

Release files for mpctools 0.16.0

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

Source distribution (sdist)

Source distribution for mpctools 0.16.0
File Size Uploaded
mpctools-0.16.0.tar.gz 105.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mpctools 0.16.0
File Interpreter ABI Platform
mpctools-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 197.7 kB

Release files / mpctools-0.16.0.tar.gz

Download URL mpctools-0.16.0.tar.gz
Size 105.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d273eedb4b9b3fd0efb9ed631e281b7a9b70bcacec244b2f57d55f77fa5d2b54
BLAKE2b-256 checksum
How to use checksums
52f4467d42bd9f2d063623f0cc3f010445ac2544d441306a424429c3810e05cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / mpctools-0.16.0-py3-none-any.whl

Download URL mpctools-0.16.0-py3-none-any.whl
Size 92.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e79055237b35866d636dc64d4db9df99346f90410bfee5c414d75618a94638ba
BLAKE2b-256 checksum
How to use checksums
2a1e4b5fc4608aefac923bdc19681bca989051804035ed170e0843c4c701f6c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

2 release files

0.7.0

2 release files

0.6.0

1 release file

0.5.0

1 release file

0.4.10

1 release file

0.4.9

1 release file

0.4.6

1 release file

0.4.1

1 release file

0.4.0

1 release file

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