Metadata-Version: 2.4
Name: pyvelora
Version: 0.2.2
Summary: Lightweight NumPy-based mathematical backend for physics libraries.
Author: Noah Ryan
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/pyvelora/
Project-URL: Issues, https://github.com/user_placeholder/pyvelora/issues
Keywords: linear-algebra,vector,matrix,tensor,numpy,scientific-computing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.23
Provides-Extra: dev
Requires-Dist: pytest>=9.0; extra == "dev"
Requires-Dist: build>=1.3; extra == "dev"
Requires-Dist: twine>=6.2; extra == "dev"

# pyvelora

A lightweight NumPy-based mathematical backend providing structured
`Vector`, `Matrix`, and `Tensor` objects for scientific computing.

## Philosophy

- Thin abstraction over NumPy
- No domain-specific logic
- Designed as reusable infrastructure for physics and simulation libraries

## Installation

```bash
pip install pyvelora
```

## Quick Start

```python
from pyvelora import Vector, Matrix, Tensor

v = Vector([3, 4])
print(v.magnitude())  # 5.0

m = Matrix([[1, 2], [3, 4]])
print(m.transpose())

t = Tensor([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
print(t.shape)  # (2, 2, 2)
```

## Coordinate Vector Input

`Vector` supports Cartesian (default), polar, spherical, and cylindrical
coordinate input.

```python
from pyvelora import Vector

# Polar input: [r, theta]
v_polar = Vector([2, 45], type="polar", degrees=True)

# Spherical input: [r, theta, phi]
v_spherical = Vector([1, 90, 30], type="spherical", degrees=True)

# Cylindrical input: [rho, phi, z]
v_cyl = Vector([2, 90, 3], type="cylindrical", degrees=True)
```

Angles are interpreted as radians unless `degrees=True` is provided.

## Error Types

The package provides reusable exception types:

- `PyveloraError`
- `ShapeError`
- `DimensionError`

```python
from pyvelora import Vector, ShapeError

try:
	_ = Vector([1, 2, 3]) + Vector([1, 2])
except ShapeError as exc:
	print(exc)
```

## Development

Run tests:

```bash
python -m pytest src/pyvelora/tests -q
```
