mopsy - Matrix Operations in Python
Convenience library to perform row/column operations over numpy and scipy matrices. Provides an interface similar to base R matrix methods/MatrixStats methods in python.
Installation
Install from pypi
pip install mopsy
Usage
from mopsy import colsum
import random from rd
# generate a random sparse array with some density
from scipy.sparse import random
mat = random(10, 150, 0.25)
# generate random groups
ngrps = 15
gsets = [x for x in range(15)]
groups = [rd.choice(gsets) for x in range(mat.shape[axis])]
colsum(mat, groups)
Methods are available to perform sum, median, mean along any axis. a generic apply method is also available for perform row-wise or column-wise operations.
Note
This project has been set up using PyScaffold 4.1.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
Metadata
Release files for mopsy 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| mopsy-0.3.0.tar.gz | 26.3 kB | Without provenance | Details for mopsy-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mopsy-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mopsy-0.3.0-py3-none-any.whl |
Total release size: 36.3 kB
Release files / mopsy-0.3.0.tar.gz
| Download URL | mopsy-0.3.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52a771e9df70ce23ca6a3a1eb8d986f20de524698ea1ce12f17f53ffd30a9b7f
|
|
BLAKE2b-256 checksum How to use checksums |
7c70860ec8cd858844efa52fa12f205744c8d47e3d19b9112c423a76b8a09147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / mopsy-0.3.0-py3-none-any.whl
| Download URL | mopsy-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1277476dc8b8d5ec57dc55015570b1b167ee4a1f649dd4ddc5d0b25096d4fa68
|
|
BLAKE2b-256 checksum How to use checksums |
2566888619634977c42f557d55f1c22029f28468a111b0eddb145628f765fd9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for mopsy 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.