Skip to content

Commit ca230f4

Browse files
committed
VariogramCloud example
1 parent b80949e commit ca230f4

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Changes - from version >= 1.x
5353
* [docs] docstring example for `ExperimentalVariogram` and `build_experimental_variogram()`, `calculate_semivariance()`, used parameters `values` and `geometries`
5454
* [docs] docstring example for `calculate_covariance()`, used parameters `values` and `geometries`
5555
* [docs] docstring example for `DirectionalVariogram`, used parameters `values` and `geometries`
56-
* [docs]
56+
* [docs] docstring example for `VariogramCloud`, used parameters `values` and `geometries`
5757

5858
2025-10-11
5959
----------

src/pyinterpolate/semivariogram/experimental/classes/variogram_cloud.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,41 @@ class VariogramCloud:
170170
--------
171171
ExperimentalVariogram : class that calculates experimental semivariogram,
172172
experimental covariogram and data variance.
173+
174+
Examples
175+
--------
176+
>>> import numpy as np
177+
>>> from pyinterpolate import VariogramCloud
178+
>>>
179+
>>>
180+
>>> REFERENCE_INPUT = np.array([
181+
... [0, 0, 8],
182+
... [1, 0, 6],
183+
... [2, 0, 4],
184+
... [3, 0, 3],
185+
... [4, 0, 6],
186+
... [5, 0, 5],
187+
... [6, 0, 7],
188+
... [7, 0, 2],
189+
... [8, 0, 8],
190+
... [9, 0, 9],
191+
... [10, 0, 5],
192+
... [11, 0, 6],
193+
... [12, 0, 3]
194+
... ])
195+
>>> STEP_SIZE = 1
196+
>>> MAX_RANGE = 4
197+
>>> vc = VariogramCloud(
198+
... values=REFERENCE_INPUT[:, -1],
199+
... geometries=REFERENCE_INPUT[:, :-1],
200+
... step_size=STEP_SIZE,
201+
... max_range=MAX_RANGE
202+
... )
203+
>>> stats = vc.describe()
204+
>>> print(stats[1]['count'])
205+
24
206+
>>> print(stats[2]['median'])
207+
9
173208
"""
174209

175210
def __init__(self,

0 commit comments

Comments
 (0)