Skip to main content
Parametrix logo

flax.nnx.Param-like computed parameters for bare JAX (and Equinox).

Documentation CI Codecov Ruff ty uv Publish PyPI PyPI - Python Version

Installation

pip install parametrix

Example

The following example shows how to use Param as a base class for a parameter class that enforces positivity:

import jax.numpy as jnp
from parametrix import Param


class PositiveOnlyParam(Param):
    def __init__(self, value):
        super().__init__(jnp.log(value))

    @property
    def value(self):
        return jnp.exp(self.raw_value)

The backing values of Params are always stored as jax.Arrays, meaning that they will automatically be picked up as learnable parameters by libraries like Equinox.

Param objects also behave like numeric types, so that they are able to be used within models and any other functions without having to make any changes to the code.

Documentation

API documentation is available at Read the Docs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parametrix-0.1.7.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

parametrix-0.1.7-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file parametrix-0.1.7.tar.gz.

File metadata

  • Download URL: parametrix-0.1.7.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for parametrix-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9c2acfca69c8abc7e7e72f91afa0a9dda9b190075ec6eeb8bdfb50da17753bee
MD5 d5b028dbb418078595cc9c00450db7b0
BLAKE2b-256 cec56222afd0d6a946af62063fefccf22c26af756e3c11ff8fa7a44003958a86

See more details on using hashes here.

File details

Details for the file parametrix-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: parametrix-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for parametrix-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 10c692adea26249ae619d00a04d3d54347f2d7d4d7159ebbf3b63a36a23f997a
MD5 aefea591d7941b9174e55dcc8fad2f17
BLAKE2b-256 f7eb96c0f67eca7f46c1d026b1bda3f9815fe11fda8bc80c187074bdb0ba6e48

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page