Demetria
Demetria is a simple package for numpy that implements lazily evaluated two-dimensional scalar and vector fields.
It is named after Demeter, the Greek goddess of agriculture, and by extension probably also of fields, ploughs, combine harvesters and other agricultural implements.
The fields are stored as functions of $x$ and $y$ and are evaluated lazily at any
point -- over regular grids or irregular meshes (both are vectorized with numpy).
Scalar fields
Fields are defined
f = ScalarField(lambda x, y: x**2 - y**3)
g = ScalarField(lambda x, y, x**3 - y)
h = (f + 3 * g)**2
xs = np.linspace(-10, 10, 101)
ys = np.linspace(-10, 10, 101)
xx, yy = np.meshgrid(xs, ys)
h(xx, yy)
Vector fields
a = VectorField(lambda x, y: (x, -y))
b = VectorField(lambda x, y: (y, 0))
c = a * b + f * b
Numerical approximations to divergence and rotation can be also computed at all points.
Zernike polynomials
Implementation of scalar and vector Zernike polynomials in general form is provided too. Noll, ANSI and (n, l) indexing are supported for scalar polynomials and (n, l, r) indexing is used for vector polynomials.
Metadata
Release files for demetria 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| demetria-0.2.0.tar.gz | 11.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| demetria-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.6 kB
Release files / demetria-0.2.0.tar.gz
| Download URL | demetria-0.2.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c33768a12a0c9f74c46f9306ac8e27cb6c44bfbad05ad4cae98c732c0b7789e5
|
|
BLAKE2b-256 checksum How to use checksums |
d348236a5284f0a8c798d7ff2bcdc24f9924f7241264ac3cd07070babf68fa9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / demetria-0.2.0-py3-none-any.whl
| Download URL | demetria-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e03c6a3537656d40782c7475927116ce53314b74f745d508c9aeddb277ed67f
|
|
BLAKE2b-256 checksum How to use checksums |
068a738b0730c5515ec4d2138f7b89ebf980900cf3871cd70854e0858e947f57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for demetria 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.