Registry / data / gstools

gstools

JSON →
library1.7.0pypypi✓ verified 90d ago

GSTools is a Python library for geostatistical modeling and random field generation. It provides covariance models, variogram estimation, kriging, and conditional/unconditional random field simulation. Current version is 1.7.0, with releases approximately every 3-6 months. Requires Python >=3.8.

pip install gstools
INSTALL
IMPORT
SIG · GSTOOLS
G
gstools
datapythonv1.7.0
Install
9.1s avg
Import
3298ms
Disk
256MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 3.418s · 254.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 9.1s · import 3.178s · 247MB
256MB installed
● package 256MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Gaussian
✓ from gstools import Gaussian
Standard import for Gaussian covariance model.

Basic random field generation with Gaussian covariance model.

import gstools as gs import numpy as np # Create a Gaussian covariance model model = gs.Gaussian(dim=2, var=1.0, len_scale=10.0) # Generate a random field x = np.linspace(0, 100, 50) y = np.linspace(0, 100, 50) seed = gs.random.MasterRNG(20170519) field = gs.SRF(model, seed=seed) # Evaluate field on a grid pos = (x, y) field(pos) print(field.field.shape) # Should be (50, 50)
Debug
Known issues
breakingIn v1.7.0, the Cython code has been outsourced to a separate package GSTools-Cython. If you had a direct dependency on compiled extensions, you may need to install gstools-cython explicitly.
fix
Use pip install gstools (auto-installs gstools-cython on most platforms) or install gstools-cython manually for non-standard environments.
affects: >=1.7.0
deprecatedThe 'temporal' flag in CovModel is deprecated since v1.5.0. Use the explicit spatio-temporal model classes instead.
fix
Use gs.SpatioTemporal models (e.g., gs.SpatioTemporalGaussian) instead of setting temporal=True.
affects: >=1.5.0
gotchaRandom field generation requires a seed object from gstools.random.MasterRNG, not a plain integer. Using an integer may cause non-reproducible results.
fix
Always wrap your seed in gs.random.MasterRNG(seed_value).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'gstools'
Package not installed.
fix
Run pip install gstools or conda install -c conda-forge gstools.
ImportError: cannot import name 'Gaussian' from 'gstools'
Incorrect import path. Gaussian is a covariance model class.
fix
Use from gstools import Gaussian.
ValueError: The 'seed' argument must be a MasterRNG instance, not an integer.
Using a plain integer as seed in SRF.
fix
Use gs.random.MasterRNG(seed_value) to wrap the seed.
Upgrade
Version history
1.7.0latest on PyPI · released Apr 28, 2025
Audit
Dependencies
numpyrequiredCore dependency for array operations.
scipyrequiredUsed for interpolation and optimization.
meshiorequiredFor mesh handling and VTK export.
emceeoptionalRequired for Bayesian inference in variogram fitting.
pykrigeoptionalAlternative kriging backend.
gstools-coreoptionalRust-based acceleration (optional, used if installed).
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
gstools — pip install gstools · libregistry