Skip to content

Commit

Permalink
fix np.NaN usages
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaelicke committed Jun 26, 2024
1 parent 22ff51c commit 6d8a846
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions skgstat/MetricSpace.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import multiprocessing as mp


def _sparse_dok_get(m, fill_value=np.NaN):
def _sparse_dok_get(m, fill_value=np.nan):
"""Like m.toarray(), but setting empty values to `fill_value`, by
default `np.NaN`, rather than 0.0.
default `np.nan`, rather than 0.0.
Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions skgstat/Variogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -3164,9 +3164,9 @@ def __str__(self): # pragma: no cover
"""
par = self.describe()

_sill = np.NaN if 'error' in par else par['sill']
_range = np.NaN if 'error' in par else par['effective_range']
_nugget = np.NaN if 'error' in par else par['nugget']
_sill = np.nan if 'error' in par else par['sill']
_range = np.nan if 'error' in par else par['effective_range']
_nugget = np.nan if 'error' in par else par['nugget']

s = "{0} Variogram\n".format(par['model'])
s += "-" * (len(s) - 1) + "\n"
Expand Down
12 changes: 6 additions & 6 deletions skgstat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def spherical(h, r, c0, b=0.0):
The effective range. Note this is not the range parameter! However,
for the spherical variogram the range and effective range are the same.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
b : float
The nugget of the variogram. This is the value of independent
Expand Down Expand Up @@ -102,7 +102,7 @@ def exponential(h, r, c0, b=0.0):
sill are exceeded. This is needed as the sill is only approached
asymptotically by an exponential function.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
b : float
The nugget of the variogram. This is the value of independent
Expand Down Expand Up @@ -164,7 +164,7 @@ def gaussian(h, r, c0, b=0.0):
sill are exceeded. This is needed as the sill is only approached
asymptotically by an exponential function.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
b : float
The nugget of the variogram. This is the value of independent
Expand Down Expand Up @@ -226,7 +226,7 @@ def cubic(h, r, c0, b=0.0):
The effective range. Note this is not the range parameter! However,
for the cubic variogram the range and effective range are the same.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
b : float
The nugget of the variogram. This is the value of independent
Expand Down Expand Up @@ -297,7 +297,7 @@ def stable(h, r, c0, s, b=0.0):
only approached asymptotically by the e-function part of the stable
model.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
s : float
Shape parameter. For s <= 2 the model will be shaped more like a
Expand Down Expand Up @@ -369,7 +369,7 @@ def matern(h, r, c0, s, b=0.0):
where 95% of the sill are exceeded. This is needed as the sill is
only approached asymptotically by Matérn model.
c0 : float
The sill of the variogram, where it will flatten out. The function
The partial sill of the variogram, where it will flatten out. The function
will not return a value higher than C0 + b.
s : float
Smoothness parameter. The smoothness parameter can shape a smooth or
Expand Down

0 comments on commit 6d8a846

Please sign in to comment.