Skip to content

Commit 58cc52b

Browse files
authored
Merge pull request #259 from GeoStat-Framework/custom-generators
Generator: add abstract __init__
2 parents 4362175 + 239c3a5 commit 58cc52b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/gstools/field/generator.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RandMeth
1212
IncomprRandMeth
1313
"""
14-
# pylint: disable=C0103, W0222, C0412
14+
# pylint: disable=C0103, W0222, C0412, W0231
1515
import warnings
1616
from abc import ABC, abstractmethod
1717
from copy import deepcopy as dcp
@@ -35,7 +35,20 @@
3535

3636

3737
class Generator(ABC):
38-
"""Abstract generator class."""
38+
"""
39+
Abstract generator class.
40+
41+
Parameters
42+
----------
43+
model : :any:`CovModel`
44+
Covariance model
45+
**kwargs
46+
Placeholder for keyword-args
47+
"""
48+
49+
@abstractmethod
50+
def __init__(self, model, **kwargs):
51+
pass
3952

4053
@abstractmethod
4154
def update(self, model=None, seed=np.nan):

0 commit comments

Comments
 (0)