Units system and automatic differentiation engine for physics-based audio synthesis
Project description
Spruce Compiler - a work in progress
Units system and automatic differentiation engine
A pre-alpha package providing symbolic automatic differentiation and dimensional analysis tools.
Installation
pip install spruce-compiler
Quick Start
from spruce import Variable, diff
from spruce.units import Quantity, meter, second
# Symbolic differentiation
x = Variable('x')
expr = x**2 + 3*x
derivative = diff(expr, x)
print(f"f'(x) = {derivative}")
# Units and dimensional analysis
length = Quantity(1.0, meter)
time = Quantity(2.0, second)
velocity = length / time
print(f"Velocity: {velocity}")
CLI
spruce demo # Run demonstrations
spruce version # Show version
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spruce_compiler-0.0.1.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spruce_compiler-0.0.1.tar.gz.
File metadata
- Download URL: spruce_compiler-0.0.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc66b42999c89b885ce1e643fb5e6f55d5436d56a2c7f1536a642544b99a36e
|
|
| MD5 |
2ccbde587b1d580e0b0d2aaad3fe7b0d
|
|
| BLAKE2b-256 |
ae191532d907871630356a89e92a020f9780c44f326f0db67d36a29b88c28013
|
File details
Details for the file spruce_compiler-0.0.1-py3-none-any.whl.
File metadata
- Download URL: spruce_compiler-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c2fed49e1a52c702abfe8a4fbdf582004328ef972a22e9376f8e09f338db5cc
|
|
| MD5 |
a239d895062d20ff4b5eba3a2510d473
|
|
| BLAKE2b-256 |
5ff88a86fe7c4663b98b6f290f153a7557f6fcf8ad89968133e31f46e7bef7ce
|