Generic-Util
This package contains convenient functions not found in Python's Standard Library (they would mostly fall within itertools, functools, operator, and time). It also contains a variety of convenience functions for the numba JIT compiler library.
See the documentation for details, but functions are grouped as follows:
- Generic_Util.benchmarking: functions covering typical code-timing scenarios, such as a "with" statement context, an n-executions timer, and a convenient function for comparing and summarising n execution times of different implementations of the same function.
- Generic_Util.iter: iterable-focussed functions, covering multiple varieties of flattening, iterable combining, grouping and predicate/property-based processing (including topological sorting), element-comparison-based operations, value interspersal, and finally batching.
- Generic_Util.operator: functions regarding item retrieval, and syntactic sugar for patterns of function application.
- Generic_Util.misc: functions with less generic purpose than in the above; currently mostly to do with min/max-based operations.
Then a sub-package is dedicated to utility functions for the numba JIT compiler library:
- Generic_Util.numba.benchmarking: functions comparing execution times of (semi-automatically-generated) varieties of numba-compilations of a given function, including lazy vs eager compilation, vectorisation, parallelisation, as well as varieties of rolling (see Generic_Util.numba.higher_order).
- Generic_Util.numba.higher_order: higher-order numba-compilation functions, currently only functions to "roll" simpler functions (1d-to-scalar or 2d-to-scalar/1d) over arrays, with a few combinations of input and output type signatures.
- Generic_Util.numba.types: convenient shorthands for frequently used numba (and respective numpy) types, with a focus on C-contiguity of arrays; these are useful in declaring eager-compilation function signatures.
Many functions which would have been included in this package were dropped in favour of using those in the wonderful more-itertools package (and where overlaps remain, there are convenient differences). Separately, although used only in one instance in this repository, the sortedcontainers package is another great source of algorithm-simplifying ingredients.
Metadata
Release files for Generic-Util 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| generic_util-0.1.0.tar.gz | 24.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| generic_util-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.4 kB
Release files / generic_util-0.1.0.tar.gz
| Download URL | generic_util-0.1.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d8524986de8cb6353f8c36e73b85d375b50d65408ebb2d2dc3de594711c7670
|
|
BLAKE2b-256 checksum How to use checksums |
9adc676bd5f0c1e0412e7da97a7d88fcca45e7049657b97b62143da70ddc39cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / generic_util-0.1.0-py3-none-any.whl
| Download URL | generic_util-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a36ca850e482423b2b5ead8946d106edf0329aa9fdc948fd633251681b0e2cb
|
|
BLAKE2b-256 checksum How to use checksums |
89053485533b43e86ab43f4b316222b92fe72441526cc4ae05791eddd7edf0d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|