Skip to main content

Small linear-algebra helpers (distance, geometric median, cosine, nannorm) — standalone module from the SciTeX ecosystem

Project description

scitex-linalg

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

Small linear-algebra helpers extracted from the SciTeX ecosystem as a standalone package.

Install

pip install scitex-linalg            # core (numpy/scipy/sympy)
pip install "scitex-linalg[torch]"   # + geometric_median (torch + geom-median)

API

import scitex_linalg as sxl

sxl.euclidean_distance(u, v, axis=0)      # element-wise Euclidean distance
sxl.cdist(u, v)                           # pairwise distances
sxl.edist(u, v)                           # alias for cdist
sxl.cosine(v1, v2)                        # cosine similarity (NaN-safe)
sxl.nannorm(v, axis=-1)                   # NaN-aware vector norm
sxl.rebase_a_vec(v, v_base)               # project v onto v_base basis
sxl.three_line_lengths_to_coords(a, b, c) # triangle side lengths -> 2-D coords
sxl.geometric_median(xx, dim=-1)          # torch geometric median (requires [torch] extra)

Status

Standalone fork of scitex.linalg — intended to remain importable as scitex.linalg via the SciTeX umbrella package's bridge module. Decorators (numpy_fn, torch_fn, wrap) are vendored under _vendor_decorators/ to keep the package free of scitex.* runtime deps; when scitex-decorators is split out, those will be replaced with a direct dependency.

License

AGPL-3.0-only (see LICENSE).

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

scitex_linalg-0.1.2.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

scitex_linalg-0.1.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file scitex_linalg-0.1.2.tar.gz.

File metadata

  • Download URL: scitex_linalg-0.1.2.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_linalg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 02fc900240b8aad7a27e2bb7427b1e460ae8977bdfaf18321618808f14b844d5
MD5 5bc20e5a361153ae6882a4e042a91d08
BLAKE2b-256 fe991c2735e32bc9963e22060b4d65a2aa129ed04047d4e0a51179b78a8d1017

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_linalg-0.1.2.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-linalg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_linalg-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: scitex_linalg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_linalg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49e9be999e385004a00f5c601034df82e1f8b721842da2a745ef67021e760295
MD5 b15e12e31300561d7f1fe003284807bd
BLAKE2b-256 2a7c7657fb6f052189ccb6d828dafb868456838c46d30ee547a89af90d7e0802

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_linalg-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-linalg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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