Skip to content

Commit

Permalink
apply black 24
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Apr 12, 2024
1 parent 7b1fd1e commit 062caa8
Show file tree
Hide file tree
Showing 81 changed files with 86 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/00_misc/00_tpl_stable.py
Expand Up @@ -40,6 +40,7 @@
\sigma^2_{\ell_{\mathrm{up}}} &=
C\cdot\frac{\ell_{\mathrm{up}}^{2H}}{2H}
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/00_misc/01_export.py
Expand Up @@ -7,6 +7,7 @@
These can be viewed for example with `Paraview <https://www.paraview.org/>`__.
"""

# sphinx_gallery_thumbnail_path = 'pics/paraview.png'
import gstools as gs

Expand Down
1 change: 1 addition & 0 deletions examples/00_misc/02_check_rand_meth_sampling.py
Expand Up @@ -2,6 +2,7 @@
Check Random Sampling
---------------------
"""

import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
Expand Down
1 change: 1 addition & 0 deletions examples/00_misc/04_herten.py
Expand Up @@ -30,6 +30,7 @@
functions, since the only produce the ``herten_transmissivity.gz``
and ``grid_dim_origin_spacing.txt``, which are already present.
"""

import os

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions examples/00_misc/05_standalone_field.py
Expand Up @@ -7,6 +7,7 @@
In the following example we will produce 10000 random points in 4D with
random values and plot them.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/01_random_field/03_unstr_srf_export.py
Expand Up @@ -6,6 +6,7 @@
Normally, such a grid would be read in, but we can simply generate one and
then create a random field at those coordinates.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/01_random_field/04_srf_merge.py
Expand Up @@ -6,6 +6,7 @@
to merge two unstructured rectangular fields.
"""

# sphinx_gallery_thumbnail_number = 2
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/01_random_field/06_pyvista_support.py
Expand Up @@ -12,6 +12,7 @@
The :any:`Field.mesh` method enables easy field creation on PyVista meshes
used by the :any:`SRF` or :any:`Krige` class.
"""

# sphinx_gallery_thumbnail_path = 'pics/GS_pyvista_cut.png'
import pyvista as pv

Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/01_basic_methods.py
Expand Up @@ -36,6 +36,7 @@
correlation function as demonstrated in the introductory example.
If one of the above functions is given, the others will be determined:
"""

import gstools as gs

model = gs.Exponential(dim=3, var=2.0, len_scale=10, nugget=0.5)
Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/02_aniso_rotation.py
Expand Up @@ -6,6 +6,7 @@
represents the isotropic case for the model.
Nevertheless, you can provide anisotropy ratios by:
"""

import gstools as gs

model = gs.Gaussian(dim=3, var=2.0, len_scale=10, anis=0.5)
Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/03_spectral_methods.py
Expand Up @@ -23,6 +23,7 @@
You can access these methods by:
"""

import gstools as gs

model = gs.Gaussian(dim=3, var=2.0, len_scale=10)
Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/04_different_scales.py
Expand Up @@ -16,6 +16,7 @@
You can access it by:
"""

import gstools as gs

model = gs.Stable(dim=3, var=2.0, len_scale=10)
Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/05_additional_para.py
Expand Up @@ -10,6 +10,7 @@
This leads to the so called **stable** covariance model and we can define it by
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/02_cov_model/06_fitting_para_ranges.py
Expand Up @@ -6,6 +6,7 @@
variogram data. In the following we will use the self defined stable model
from a previous example.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/00_fit_variogram.py
Expand Up @@ -2,6 +2,7 @@
Fit Variogram
-------------
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/01_find_best_model.py
Expand Up @@ -2,6 +2,7 @@
Finding the best fitting variogram model
----------------------------------------
"""

import numpy as np
from matplotlib import pyplot as plt

Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/02_multi_vario.py
Expand Up @@ -5,6 +5,7 @@
In this example, we demonstrate how to estimate a variogram from multiple
fields on the same point-set that should have the same statistical properties.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/03_directional_2d.py
Expand Up @@ -7,6 +7,7 @@
Afterwards we will fit a model to this estimated variogram and show the result.
"""

import numpy as np
from matplotlib import pyplot as plt

Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/04_directional_3d.py
Expand Up @@ -7,6 +7,7 @@
Afterwards we will fit a model to this estimated variogram and show the result.
"""

import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/05_auto_fit_variogram.py
Expand Up @@ -2,6 +2,7 @@
Fit Variogram with automatic binning
------------------------------------
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/03_variogram/06_auto_bin_latlon.py
Expand Up @@ -8,6 +8,7 @@
We use a data set from 20 meteo-stations choosen randomly.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/04_vector_field/00_2d_vector_field.py
Expand Up @@ -5,6 +5,7 @@
As a first example we are going to generate a 2d vector field with a Gaussian
covariance model on a structured grid:
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/04_vector_field/01_3d_vector_field.py
Expand Up @@ -6,6 +6,7 @@
Gaussian covariance model. The mesh on which we generate the field will be
externally defined and it will be generated by PyVista.
"""

# sphinx_gallery_thumbnail_path = 'pics/GS_3d_vector_field.png'
import pyvista as pv

Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/00_simple_kriging.py
Expand Up @@ -27,6 +27,7 @@
The mean of the field has to be given beforehand.
"""

import numpy as np

from gstools import Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/01_ordinary_kriging.py
Expand Up @@ -27,6 +27,7 @@
Here we use ordinary kriging in 1D (for plotting reasons) with 5 given observations/conditions.
The estimated mean can be accessed by ``krig.mean``.
"""

import numpy as np

from gstools import Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/02_pykrige_interface.py
Expand Up @@ -11,6 +11,7 @@
To demonstrate the general workflow, we compare ordinary kriging of PyKrige
with the corresponding GSTools routine in 2D:
"""

import numpy as np
from matplotlib import pyplot as plt
from pykrige.ok import OrdinaryKriging
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/03_compare_kriging.py
Expand Up @@ -2,6 +2,7 @@
Compare Kriging
---------------
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/04_extdrift_kriging.py
Expand Up @@ -2,6 +2,7 @@
External Drift Kriging
----------------------
"""

import numpy as np

from gstools import SRF, Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/05_universal_kriging.py
Expand Up @@ -13,6 +13,7 @@
To access only the estimated mean/drift, we provide a switch `only_mean`
in the call routine.
"""

import numpy as np

from gstools import SRF, Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/06_detrended_kriging.py
Expand Up @@ -2,6 +2,7 @@
Detrended Kriging
-----------------
"""

import numpy as np

from gstools import SRF, Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/07_detrended_ordinary_kriging.py
Expand Up @@ -2,6 +2,7 @@
Detrended Ordinary Kriging
--------------------------
"""

import numpy as np

from gstools import SRF, Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/05_kriging/09_pseudo_inverse.py
Expand Up @@ -17,6 +17,7 @@
In the following we have two different values at the same location.
The resulting kriging field will hold the average at this point.
"""

import numpy as np

from gstools import Gaussian, krige
Expand Down
1 change: 1 addition & 0 deletions examples/06_conditioned_fields/00_condition_ensemble.py
Expand Up @@ -6,6 +6,7 @@
with 5 given observations/conditions,
to generate an ensemble of conditioned random fields.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/06_conditioned_fields/01_2D_condition_ensemble.py
Expand Up @@ -4,6 +4,7 @@
Let's create an ensemble of conditioned random fields in 2D.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/00_log_normal.py
Expand Up @@ -6,6 +6,7 @@
See :any:`transform.normal_to_lognormal`
"""

import gstools as gs

# structured field with a size of 100x100 and a grid-size of 1x1
Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/01_binary.py
Expand Up @@ -8,6 +8,7 @@
See :any:`transform.binary`
"""

import gstools as gs

# structured field with a size of 100x100 and a grid-size of 1x1
Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/02_discrete.py
Expand Up @@ -9,6 +9,7 @@
See :any:`transform.discrete`
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/03_zinn_harvey.py
Expand Up @@ -9,6 +9,7 @@
See :any:`transform.zinnharvey`
"""

import gstools as gs

# structured field with a size of 100x100 and a grid-size of 1x1
Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/04_bimodal.py
Expand Up @@ -11,6 +11,7 @@
See: :any:`transform.normal_to_arcsin` and :any:`transform.normal_to_uquad`
"""

import gstools as gs

# structured field with a size of 100x100 and a grid-size of 1x1
Expand Down
1 change: 1 addition & 0 deletions examples/07_transformations/05_combinations.py
Expand Up @@ -15,6 +15,7 @@
If you don't specify `field` and `store` everything happens inplace.
"""

# sphinx_gallery_thumbnail_number = 1
import gstools as gs

Expand Down
1 change: 1 addition & 0 deletions examples/08_geo_coordinates/00_field_generation.py
Expand Up @@ -16,6 +16,7 @@
To generate the field, we simply pass ``(lat, lon)`` as the position tuple
to the :any:`SRF` class.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/08_geo_coordinates/01_dwd_krige.py
Expand Up @@ -15,6 +15,7 @@
In order to keep the number of dependecies low, the calls of both functions
shown beneath are commented out.
"""

# sphinx_gallery_thumbnail_number = 2
import matplotlib.pyplot as plt
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions examples/09_spatio_temporal/03_geographic_coordinates.py
Expand Up @@ -18,6 +18,7 @@
We will set a spatial length-scale of `1000` and a time length-scale of `100` days.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/10_normalizer/00_lognormal_kriging.py
Expand Up @@ -14,6 +14,7 @@
In this example we will use ordinary kriging.
"""

import numpy as np

import gstools as gs
Expand Down
1 change: 1 addition & 0 deletions examples/10_normalizer/01_auto_fit.py
Expand Up @@ -18,6 +18,7 @@
We will generate the "original" field on a 60x60 mesh, from which we will take
samples in order to pretend a situation of data-scarcity.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/10_normalizer/02_compare.py
Expand Up @@ -6,6 +6,7 @@
But first, we define a convenience routine and make some imports as always.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions setup.py
@@ -1,4 +1,5 @@
"""GSTools: A geostatistical toolbox."""

import os

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/gstools/__init__.py
Expand Up @@ -129,6 +129,7 @@
DEGREE_SCALE
RADIAN_SCALE
"""

# Hooray!
from gstools import (
config,
Expand Down
1 change: 1 addition & 0 deletions src/gstools/config.py
Expand Up @@ -4,6 +4,7 @@
.. currentmodule:: gstools.config
"""

NUM_THREADS = None

# pylint: disable=W0611
Expand Down
1 change: 1 addition & 0 deletions src/gstools/covmodel/base.py
Expand Up @@ -8,6 +8,7 @@
.. autosummary::
CovModel
"""

# pylint: disable=C0103, R0201, E1101, C0302, W0613
import copy

Expand Down

0 comments on commit 062caa8

Please sign in to comment.