Skip to main content

Composable expressions in JAX + Equinox

Project description

eqxpress is a lightweight library for composing expressions over input-output space.

eqxpress
Author Gary Allen
Homepage github.com/eqxpress/eqxpress
Docs gvcallen.github.io/eqxpress

Installation

eqxpress can be installed via pip.

pip install eqxpress

Example

class Scale(AbstractExpression):
    def __call__(self, x): return {"data": x * 2.0}

class Shift(AbstractExpression):
    def __call__(self, x): return {"data": x + 5.0}

# 1. Build the deferred computation graph
# Mathematically defines h(x) = Scale(x) + 10 * Shift(x)
h = Scale() + 10 * Shift()

# 2. Evaluate the combined mapping
# Operations map point-wise over the dictionary keys automatically
y = h(10.0) 

# y == {"data": (10.0 * 2.0) + 10 * (10.0 + 5.0)} 
# y == {"data": 170.0}

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

eqxpress-0.0.3.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

eqxpress-0.0.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file eqxpress-0.0.3.tar.gz.

File metadata

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

File hashes

Hashes for eqxpress-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ef74ad837b7c7ed80cd188e7d4ec563f84013f361269cdf09be6920a0ad6f23c
MD5 67ed0a81a0a28391120e5532d0be4758
BLAKE2b-256 fb20f698b61b5c973acfd51602949be390a660e5e3a35c80bfdffaf7c6641aac

See more details on using hashes here.

Provenance

The following attestation bundles were made for eqxpress-0.0.3.tar.gz:

Publisher: publish.yml on gvcallen/eqxpress

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

File details

Details for the file eqxpress-0.0.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for eqxpress-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ffcc0ed1182714eb4854144a7150a70ea1077afc5d5fa9027369a7ce93a6bb0
MD5 a6f743f6c28ac5b8f32dc966dcfd70a8
BLAKE2b-256 3dc6bcb7e2cb37821da5b92f0340ef60d0297301ecbbe91b6ddd141708bb427f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eqxpress-0.0.3-py3-none-any.whl:

Publisher: publish.yml on gvcallen/eqxpress

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