Skip to main content

Matrix operations for numpy and scipy

Project description

Project generated with PyScaffold PyPI-Server Unit tests

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/.

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

mopsy-0.3.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

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

mopsy-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file mopsy-0.3.0.tar.gz.

File metadata

  • Download URL: mopsy-0.3.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for mopsy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 52a771e9df70ce23ca6a3a1eb8d986f20de524698ea1ce12f17f53ffd30a9b7f
MD5 254c849f2ff81955374c7d5b50e88177
BLAKE2b-256 7c70860ec8cd858844efa52fa12f205744c8d47e3d19b9112c423a76b8a09147

See more details on using hashes here.

File details

Details for the file mopsy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mopsy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for mopsy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1277476dc8b8d5ec57dc55015570b1b167ee4a1f649dd4ddc5d0b25096d4fa68
MD5 92511ca54699ba3cea8e8a616a6c6efc
BLAKE2b-256 2566888619634977c42f557d55f1c22029f28468a111b0eddb145628f765fd9e

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