# 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](https://pypi.org/project/mpctools/), and hence the latest
(stable) release can be installed simply:
```shell script
pip install mpctools [--no-deps]
```
Note that the `--no-deps` flag is optional (as described [above](#requirements)).
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):
```shell script
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/michael-camilleri/mpctools",
"name": "mpctools",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "extensions, parallel, utilities",
"author": "Michael P. J. Camilleri",
"author_email": "michael.p.camilleri@ed.ac.uk",
"download_url": "https://files.pythonhosted.org/packages/67/82/eeafd40164c1d8f4e14a3a60c2ac12739caf8232697969e757adfcf1b348/mpctools-0.13.3.tar.gz",
"platform": null,
"description": "# mpctools\nA set of python tools for extending standard (and non-standard) libraries. These originated from\n my own needs and those of my students, and I decided to put them here in case they may be useful\n to other people.\n\n## Features\n\nThe library currently contains the following two packages:\n 1. `extensions`: A number of extensions to numpy, sklearn, pandas and matplotlib, as well as general-purpose utilities.\n 2. `parallel`: A set of tools for wrapping pathos multiprocessing in a simple easy to use interface with multiple\n parallel workers.\n\nMore details for each library are provided as doxygen-style comments in the modules.\n\n## Setting up\n\n### Requirements\n\nThis Library has the following dependencies:\n * opencv-python\n * scikit-learn\n * matplotlib\n * deprecated\n * lapsolver\n * hotelling\n * seaborn\n * pandas\n * pathos\n * scipy\n * numpy\n * numba\n\nIn most cases, the above can be automatically installed through the library itself (i.e. pip will\nattempt to download them). If this causes issues, or you wish to install specific versions (such\nas building `opencv` from source), you can prevent dependency checking by passing the `--no-deps`\nflag.\n\n### Installing\n\nThe project is available on [PyPi](https://pypi.org/project/mpctools/), and hence the latest\n (stable) release can be installed simply:\n ```shell script\n pip install mpctools [--no-deps]\n ```\nNote that the `--no-deps` flag is optional (as described [above](#requirements)).\n\nAlternatively, you may choose to install directly from source. This has the added advantage that if\nyou change any of the implementations, the changes will be reflected without having to rebuild.\nHowever, you will have to manually download the source (via git or just zipped and then extracted):\n ```shell script\n python setup.py build develop [--no-deps]\n ```\n\n### Known Issues\n\n * **Python 3.7: parallel.IWorker** - There seems to be an incompatibility in pathos with python 3.7, which is causing\n it to default to pickle rather than dill, and sometimes preventing abc-derived classes (namely the IWorker instance)\n from being pickled. If this happens to you, just make your worker a standard class and copy the initialiser and \n `update_progress` methods from IWorker. We are working on a solution to this.\n * **parallel Blocking** - If the program seems to hang for no reason, it could be that one of the child processes died\n maybe due to a memory overlow... if this happens, try to limit the amount of memory usage by each IWorker.\n",
"bugtrack_url": null,
"license": "GNU GPL",
"summary": "A set of tools and utilities for extending common libraries and providing parallel capabilities.",
"version": "0.13.3",
"project_urls": {
"Download": "https://github.com/michael-camilleri/mpctools/archive/v_01330.tar.gz",
"Homepage": "https://github.com/michael-camilleri/mpctools"
},
"split_keywords": [
"extensions",
" parallel",
" utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43193dd6201ee4ad20705eb0ef158f1dc89e5a3cc51c07219386482318e5e3b7",
"md5": "33800e3ace23899efdb235feb0c73dd3",
"sha256": "911b0ca7c5ec6d1c1dbf883cbfeb1e8a2dd6376803bf208bee219bdcc3dc42ab"
},
"downloads": -1,
"filename": "mpctools-0.13.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "33800e3ace23899efdb235feb0c73dd3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 95977,
"upload_time": "2024-07-18T09:32:02",
"upload_time_iso_8601": "2024-07-18T09:32:02.491067Z",
"url": "https://files.pythonhosted.org/packages/43/19/3dd6201ee4ad20705eb0ef158f1dc89e5a3cc51c07219386482318e5e3b7/mpctools-0.13.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6782eeafd40164c1d8f4e14a3a60c2ac12739caf8232697969e757adfcf1b348",
"md5": "acef5b70e5abf7b1f107ba80ba6cd246",
"sha256": "079dbe0be84962788a8e67b35fad03f3c5ec5215d0cbe18303becac0ab4ca1fd"
},
"downloads": -1,
"filename": "mpctools-0.13.3.tar.gz",
"has_sig": false,
"md5_digest": "acef5b70e5abf7b1f107ba80ba6cd246",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 83906,
"upload_time": "2024-07-18T09:32:04",
"upload_time_iso_8601": "2024-07-18T09:32:04.356800Z",
"url": "https://files.pythonhosted.org/packages/67/82/eeafd40164c1d8f4e14a3a60c2ac12739caf8232697969e757adfcf1b348/mpctools-0.13.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 09:32:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michael-camilleri",
"github_project": "mpctools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mpctools"
}