diff --git a/docs/source/conf.py b/docs/source/conf.py index f197f626..e1a99a2a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # # GeoStatTools documentation build configuration file, created by # sphinx-quickstart on Fri Jan 5 14:20:43 2018. @@ -111,7 +110,7 @@ def setup(app): # General information about the project. curr_year = datetime.datetime.now().year project = "GSTools" -copyright = "2018 - {}, Sebastian Müller, Lennart Schüler".format(curr_year) +copyright = f"2018 - {curr_year}, Sebastian Müller, Lennart Schüler" author = "Sebastian Müller, Lennart Schüler" # The version info for the project you're documenting, acts as replacement for diff --git a/examples/00_misc/02_check_rand_meth_sampling.py b/examples/00_misc/02_check_rand_meth_sampling.py index dfbfd741..0b23a929 100644 --- a/examples/00_misc/02_check_rand_meth_sampling.py +++ b/examples/00_misc/02_check_rand_meth_sampling.py @@ -57,7 +57,7 @@ def plot_rand_meth_samples(generator): sample_in = np.sum(rad <= np.max(x)) ax.hist(rad[rad <= np.max(x)], bins=sample_in // 50, density=True) ax.set_xlim([0, np.max(x)]) - ax.set_title("Radius samples shown {}/{}".format(sample_in, len(rad))) + ax.set_title(f"Radius samples shown {sample_in}/{len(rad)}") ax.legend() plt.show() diff --git a/examples/01_random_field/00_gaussian.py b/examples/01_random_field/00_gaussian.py index 726ad653..b7bde5f9 100644 --- a/examples/01_random_field/00_gaussian.py +++ b/examples/01_random_field/00_gaussian.py @@ -1,4 +1,4 @@ -""" +r""" A Very Simple Example --------------------- diff --git a/examples/01_random_field/05_mesh_ensemble.py b/examples/01_random_field/05_mesh_ensemble.py index 8ff13e4b..1e2f0da8 100755 --- a/examples/01_random_field/05_mesh_ensemble.py +++ b/examples/01_random_field/05_mesh_ensemble.py @@ -46,13 +46,13 @@ # You can specify the field name by the keyword `name`. for i in range(fields_no): - srf.mesh(mesh, points="centroids", name="c-field-{}".format(i), seed=i) + srf.mesh(mesh, points="centroids", name=f"c-field-{i}", seed=i) ############################################################################### # Now we generate fields on the mesh-points again controlled by a seed. for i in range(fields_no): - srf.mesh(mesh, points="points", name="p-field-{}".format(i), seed=i) + srf.mesh(mesh, points="points", name=f"p-field-{i}", seed=i) ############################################################################### # To get an impression we now want to plot the generated fields. diff --git a/setup.py b/setup.py index 4dd06ad7..30fc704b 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """GSTools: A geostatistical toolbox.""" import os diff --git a/src/gstools/__init__.py b/src/gstools/__init__.py index 970574ff..6f5a2034 100644 --- a/src/gstools/__init__.py +++ b/src/gstools/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Purpose ======= diff --git a/src/gstools/config.py b/src/gstools/config.py index 38f3e7fa..30ac4554 100644 --- a/src/gstools/config.py +++ b/src/gstools/config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing global variables. diff --git a/src/gstools/covmodel/__init__.py b/src/gstools/covmodel/__init__.py index 38414a48..0c61d404 100644 --- a/src/gstools/covmodel/__init__.py +++ b/src/gstools/covmodel/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a set of handy covariance models. diff --git a/src/gstools/covmodel/base.py b/src/gstools/covmodel/base.py index 2e366f94..686768fa 100644 --- a/src/gstools/covmodel/base.py +++ b/src/gstools/covmodel/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing the base class for covariance models. diff --git a/src/gstools/covmodel/fit.py b/src/gstools/covmodel/fit.py index b50dad94..2ff5398b 100755 --- a/src/gstools/covmodel/fit.py +++ b/src/gstools/covmodel/fit.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for the covariance-model. diff --git a/src/gstools/covmodel/models.py b/src/gstools/covmodel/models.py index 61243486..a2aaf6a3 100644 --- a/src/gstools/covmodel/models.py +++ b/src/gstools/covmodel/models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing different covariance models. diff --git a/src/gstools/covmodel/plot.py b/src/gstools/covmodel/plot.py index 574e0e20..e6453a8d 100644 --- a/src/gstools/covmodel/plot.py +++ b/src/gstools/covmodel/plot.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing plotting routines for the covariance models. diff --git a/src/gstools/covmodel/tools.py b/src/gstools/covmodel/tools.py index cfc58636..98ed3b8a 100644 --- a/src/gstools/covmodel/tools.py +++ b/src/gstools/covmodel/tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for the covariance-model. diff --git a/src/gstools/covmodel/tpl_models.py b/src/gstools/covmodel/tpl_models.py index c173d006..5e980760 100644 --- a/src/gstools/covmodel/tpl_models.py +++ b/src/gstools/covmodel/tpl_models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing truncated power law covariance models. diff --git a/src/gstools/field/__init__.py b/src/gstools/field/__init__.py index aa51bef4..65718bc7 100644 --- a/src/gstools/field/__init__.py +++ b/src/gstools/field/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for spatial random fields. diff --git a/src/gstools/field/base.py b/src/gstools/field/base.py index 48fe7e25..903f3893 100755 --- a/src/gstools/field/base.py +++ b/src/gstools/field/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a base class for spatial fields. diff --git a/src/gstools/field/cond_srf.py b/src/gstools/field/cond_srf.py index 70ef6cc6..385216ba 100644 --- a/src/gstools/field/cond_srf.py +++ b/src/gstools/field/cond_srf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a class for conditioned spatial random fields. diff --git a/src/gstools/field/generator.py b/src/gstools/field/generator.py index c2de58ff..4e171950 100644 --- a/src/gstools/field/generator.py +++ b/src/gstools/field/generator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing generators for spatial random fields. diff --git a/src/gstools/field/plot.py b/src/gstools/field/plot.py index 009d901d..528cdcc3 100644 --- a/src/gstools/field/plot.py +++ b/src/gstools/field/plot.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing plotting routines for spatial fields. diff --git a/src/gstools/field/srf.py b/src/gstools/field/srf.py index 06839779..a8a1e575 100644 --- a/src/gstools/field/srf.py +++ b/src/gstools/field/srf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a class for standard spatial random fields. diff --git a/src/gstools/field/summator.pyx b/src/gstools/field/summator.pyx index ecd7ea58..cad20e1d 100644 --- a/src/gstools/field/summator.pyx +++ b/src/gstools/field/summator.pyx @@ -1,5 +1,4 @@ #cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True -# -*- coding: utf-8 -*- """ This is the randomization method summator, implemented in cython. """ diff --git a/src/gstools/field/tools.py b/src/gstools/field/tools.py index 019f2e58..4b128d8a 100644 --- a/src/gstools/field/tools.py +++ b/src/gstools/field/tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for Fields. diff --git a/src/gstools/field/upscaling.py b/src/gstools/field/upscaling.py index cf77892d..ac5f49a9 100644 --- a/src/gstools/field/upscaling.py +++ b/src/gstools/field/upscaling.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing upscaling routines for the spatial random field. diff --git a/src/gstools/krige/__init__.py b/src/gstools/krige/__init__.py index cc2436cd..9bb17fae 100644 --- a/src/gstools/krige/__init__.py +++ b/src/gstools/krige/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing kriging. diff --git a/src/gstools/krige/base.py b/src/gstools/krige/base.py index e48c8fcc..77c6832e 100755 --- a/src/gstools/krige/base.py +++ b/src/gstools/krige/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a base class for kriging. diff --git a/src/gstools/krige/krigesum.pyx b/src/gstools/krige/krigesum.pyx index 41911cef..de3a43b1 100644 --- a/src/gstools/krige/krigesum.pyx +++ b/src/gstools/krige/krigesum.pyx @@ -1,5 +1,4 @@ #cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True -# -*- coding: utf-8 -*- """ This is a summator for the kriging routines """ diff --git a/src/gstools/krige/methods.py b/src/gstools/krige/methods.py index 280e6811..653785f8 100644 --- a/src/gstools/krige/methods.py +++ b/src/gstools/krige/methods.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing a class for simple kriging. diff --git a/src/gstools/krige/tools.py b/src/gstools/krige/tools.py index 183b918f..e3112ae4 100644 --- a/src/gstools/krige/tools.py +++ b/src/gstools/krige/tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for Kriging. diff --git a/src/gstools/normalizer/__init__.py b/src/gstools/normalizer/__init__.py index f76a490f..24933fc7 100644 --- a/src/gstools/normalizer/__init__.py +++ b/src/gstools/normalizer/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing normalization routines. diff --git a/src/gstools/normalizer/base.py b/src/gstools/normalizer/base.py index e8bb0a50..0072d6a9 100644 --- a/src/gstools/normalizer/base.py +++ b/src/gstools/normalizer/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing the base class for normalizers. diff --git a/src/gstools/normalizer/methods.py b/src/gstools/normalizer/methods.py index 3776ba1f..f66cfd19 100644 --- a/src/gstools/normalizer/methods.py +++ b/src/gstools/normalizer/methods.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing different normalizer transformations. diff --git a/src/gstools/normalizer/tools.py b/src/gstools/normalizer/tools.py index 2d28bef9..7a5237b7 100644 --- a/src/gstools/normalizer/tools.py +++ b/src/gstools/normalizer/tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for Normalizers. diff --git a/src/gstools/random/__init__.py b/src/gstools/random/__init__.py index 6c02da31..20fd9c45 100644 --- a/src/gstools/random/__init__.py +++ b/src/gstools/random/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage for random number generation. diff --git a/src/gstools/random/rng.py b/src/gstools/random/rng.py index 11caad84..4f698557 100644 --- a/src/gstools/random/rng.py +++ b/src/gstools/random/rng.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing the core of the spatial random field generation. diff --git a/src/gstools/random/tools.py b/src/gstools/random/tools.py index 831b1f6a..d61327ea 100644 --- a/src/gstools/random/tools.py +++ b/src/gstools/random/tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for random sampling. diff --git a/src/gstools/tools/__init__.py b/src/gstools/tools/__init__.py index 730026cf..18892557 100644 --- a/src/gstools/tools/__init__.py +++ b/src/gstools/tools/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing miscellaneous tools. diff --git a/src/gstools/tools/export.py b/src/gstools/tools/export.py index af6f61bd..3e522c92 100644 --- a/src/gstools/tools/export.py +++ b/src/gstools/tools/export.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing export routines. diff --git a/src/gstools/tools/geometric.py b/src/gstools/tools/geometric.py index 84311447..afdcacaf 100644 --- a/src/gstools/tools/geometric.py +++ b/src/gstools/tools/geometric.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing geometric tools. diff --git a/src/gstools/tools/misc.py b/src/gstools/tools/misc.py index 301da075..068200b7 100755 --- a/src/gstools/tools/misc.py +++ b/src/gstools/tools/misc.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing miscellaneous tools. diff --git a/src/gstools/tools/special.py b/src/gstools/tools/special.py index b5cd6bd6..c48887ea 100644 --- a/src/gstools/tools/special.py +++ b/src/gstools/tools/special.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing special functions. diff --git a/src/gstools/transform/__init__.py b/src/gstools/transform/__init__.py index cffe744f..9f9344c1 100644 --- a/src/gstools/transform/__init__.py +++ b/src/gstools/transform/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing transformations to post-process normal fields. diff --git a/src/gstools/transform/array.py b/src/gstools/transform/array.py index e1b88ac6..32005f00 100644 --- a/src/gstools/transform/array.py +++ b/src/gstools/transform/array.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing array transformations. diff --git a/src/gstools/transform/field.py b/src/gstools/transform/field.py index 795ed2a1..9ac33b6c 100644 --- a/src/gstools/transform/field.py +++ b/src/gstools/transform/field.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing field transformations. diff --git a/src/gstools/variogram/__init__.py b/src/gstools/variogram/__init__.py index 62122ad0..59e10f55 100644 --- a/src/gstools/variogram/__init__.py +++ b/src/gstools/variogram/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for estimating and fitting variograms. diff --git a/src/gstools/variogram/binning.py b/src/gstools/variogram/binning.py index b005d466..be490110 100644 --- a/src/gstools/variogram/binning.py +++ b/src/gstools/variogram/binning.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing binning routines. diff --git a/src/gstools/variogram/estimator.pyx b/src/gstools/variogram/estimator.pyx index a3f40b5e..55e7b91a 100644 --- a/src/gstools/variogram/estimator.pyx +++ b/src/gstools/variogram/estimator.pyx @@ -1,6 +1,5 @@ #cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True # distutils: language = c++ -# -*- coding: utf-8 -*- """ This is the variogram estimater, implemented in cython. """ @@ -251,7 +250,7 @@ def unstructured( else: distance = dist_haversine if dim != 2: - raise ValueError('Haversine: dim = {0} != 2'.format(dim)) + raise ValueError('Haversine: dim = {} != 2'.format(dim)) if pos.shape[1] != f.shape[1]: raise ValueError('len(pos) = {0} != len(f) = {1} '. diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index fc65d8c9..b57e0354 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ GStools subpackage providing tools for estimating and fitting variograms. diff --git a/tests/test_condition.py b/tests/test_condition.py index 2e70d9c2..e6b0c0cc 100644 --- a/tests/test_condition.py +++ b/tests/test_condition.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """This is the unittest of CondSRF class.""" import unittest from copy import copy diff --git a/tests/test_covmodel.py b/tests/test_covmodel.py index 3b9b5eaa..b4344cc2 100644 --- a/tests/test_covmodel.py +++ b/tests/test_covmodel.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of CovModel class. """ diff --git a/tests/test_field.py b/tests/test_field.py index c33a78c1..cdb0365d 100644 --- a/tests/test_field.py +++ b/tests/test_field.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- """ This is the unittest of SRF class. """ diff --git a/tests/test_incomprrandmeth.py b/tests/test_incomprrandmeth.py index 0403f90c..9156b1b1 100644 --- a/tests/test_incomprrandmeth.py +++ b/tests/test_incomprrandmeth.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of the RandMeth class. """ diff --git a/tests/test_krige.py b/tests/test_krige.py index afcdf838..a37bf1e1 100644 --- a/tests/test_krige.py +++ b/tests/test_krige.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of the kriging module. """ diff --git a/tests/test_latlon.py b/tests/test_latlon.py index 6f035a3a..10d9f682 100644 --- a/tests/test_latlon.py +++ b/tests/test_latlon.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest for latlon related routines. """ diff --git a/tests/test_normalizer.py b/tests/test_normalizer.py index 03480da5..9ab0f45e 100644 --- a/tests/test_normalizer.py +++ b/tests/test_normalizer.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of the Normalizer class. """ diff --git a/tests/test_randmeth.py b/tests/test_randmeth.py index 0930b0b6..1ed6cc1f 100644 --- a/tests/test_randmeth.py +++ b/tests/test_randmeth.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of the RandMeth class. """ diff --git a/tests/test_rng.py b/tests/test_rng.py index 23119921..8fe16728 100644 --- a/tests/test_rng.py +++ b/tests/test_rng.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is the unittest of the RNG class. """ diff --git a/tests/test_srf.py b/tests/test_srf.py index a96e0e6f..eb9468ca 100644 --- a/tests/test_srf.py +++ b/tests/test_srf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- """ This is the unittest of SRF class. """ diff --git a/tests/test_transform.py b/tests/test_transform.py index 630f9fcd..eb2980e2 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """This is the unittest of the transform submodule.""" import unittest diff --git a/tests/test_variogram_structured.py b/tests/test_variogram_structured.py index e1ad1908..e0a3525a 100644 --- a/tests/test_variogram_structured.py +++ b/tests/test_variogram_structured.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is a unittest of the variogram module. """ diff --git a/tests/test_variogram_unstructured.py b/tests/test_variogram_unstructured.py index 2e873537..10b085bf 100644 --- a/tests/test_variogram_unstructured.py +++ b/tests/test_variogram_unstructured.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ This is a unittest of the variogram module. """