quantity 0.13.1

Representation of quantites, i.e. of unit valued scalars and arrays.
Documentation
[package]

name = "quantity"

version = "0.13.1"

authors = [

    "Philipp Rehner <prehner@ethz.ch>",

    "Gernot Bauer <bauer@itt.uni-stuttgart.de>",

]

rust-version = "1.87"

edition = "2024"

license = "MIT OR Apache-2.0"

description = "Representation of quantites, i.e. of unit valued scalars and arrays."

homepage = "https://github.com/itt-ustutt/quantity"

readme = "README.md"

repository = "https://github.com/itt-ustutt/quantity"

keywords = ["physics", "units", "SI"]

categories = ["data-structures", "science"]

exclude = ["/.github/*", "*.ipynb", "/docs"]



[package.metadata.docs.rs]

features = ["python_numpy", "num-dual", "approx"]

rustdoc-args = ["--html-in-header", "./src/docs-header.html"]



[workspace]

members = ["si-units", "example/extend_quantity"]



[dependencies]

num-traits = "0.2"

document-features = "0.2"

## Use N-dimensional arrays from the [ndarray] crate as value of a quantity.

ndarray = { version = "0.17", optional = true }

## Use dynamic or static arrays from the [nalgebra] crate as value of a quantity.

nalgebra = { version = "0.34", optional = true }

approx = { version = "0.5", optional = true }

pyo3 = { version = "0.27", optional = true }

numpy = { version = "0.27", optional = true }

num-dual = { version = "0.13", optional = true }



[dev-dependencies]

approx = "0.5"



[features]

default = []

## Use generalized (hyper-)dual numbers from the [num-dual] crate as value of a quantity.

num-dual = ["dep:num-dual", "nalgebra"]

## Directly use (scalar) quantities in Python interfaces through [pyo3] and the [si-units](https://pypi.org/project/si-units/) package.

python = ["pyo3"]

## Use scalar and array quantities in Python interfaces through [pyo3], [numpy], and the [si-units](https://pypi.org/project/si-units/) package.

python_numpy = ["python", "numpy/nalgebra", "ndarray", "nalgebra"]

## Enable approximate comparisons through the [approx] crate.

approx = ["dep:approx", "ndarray?/approx"]