Skip to content

Commit a4cc2a4

Browse files
committed
calculate_semivariance() example
1 parent 65a0862 commit a4cc2a4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Changes - from version >= 1.x
5050
* [tests] `Deviation` class tests and debug (method selection)
5151
* [docs] docstring example for `Deviation`
5252
* [docs] docstring examples for `AggregatedVariogram` and `regularize()`
53-
* [docs] docstring examples for `ExperimentalVariogram` and `build_experimental_variogram()`, used parameters `values` and `geometries`
53+
* [docs] docstring examples for `ExperimentalVariogram` and `build_experimental_variogram()`, `calculate_semivariance()`, used parameters `values` and `geometries`
5454
* [docs]
5555

5656
2025-10-11

src/pyinterpolate/semivariogram/experimental/experimental_semivariogram.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ def calculate_semivariance(ds: Union[ArrayLike, VariogramPoints] = None,
171171
Examples
172172
--------
173173
>>> import numpy as np
174+
>>> from pyinterpolate import calculate_semivariance
175+
>>>
176+
>>>
174177
>>> REFERENCE_INPUT = np.array([
175178
... [0, 0, 8],
176179
... [1, 0, 6],
@@ -189,7 +192,8 @@ def calculate_semivariance(ds: Union[ArrayLike, VariogramPoints] = None,
189192
>>> STEP_SIZE = 1
190193
>>> MAX_RANGE = 4
191194
>>> semivariances = calculate_semivariance(
192-
... REFERENCE_INPUT,
195+
... values=REFERENCE_INPUT[:, -1],
196+
... geometries=REFERENCE_INPUT[:, :-1],
193197
... step_size=STEP_SIZE,
194198
... max_range=MAX_RANGE)
195199
>>> print(semivariances[0])

0 commit comments

Comments
 (0)