Skip to content

Commit 7ad8ab9

Browse files
author
Sofiane HADDAD
committed
Cosmetics
- Fix CovairanceModel docstrings - Fix tests in set{Amplitude, Scale} ( replace 0 per 0.0 ... )
1 parent 6fafde8 commit 7ad8ab9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/src/Base/Stat/CovarianceModelImplementation.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ void CovarianceModelImplementation::setAmplitude(const Point & amplitude)
508508
{
509509
if (amplitude.getDimension() != dimension_) throw InvalidArgumentException(HERE) << "In CovarianceModelImplementation::setAmplitude: the given amplitude has a dimension=" << amplitude.getDimension() << " different from the dimension=" << dimension_;
510510
for (UnsignedInteger index = 0; index < dimension_; ++index)
511-
if (amplitude[index] <= 0)
511+
if (!(amplitude[index] > 0.0))
512512
throw InvalidArgumentException(HERE) << "In CovarianceModelImplementation::setAmplitude, the component " << index << " of amplitude is non positive" ;
513513
amplitude_ = amplitude;
514514
updateSpatialCovariance();
@@ -524,7 +524,7 @@ void CovarianceModelImplementation::setScale(const Point & scale)
524524
{
525525
if (scale.getDimension() != spatialDimension_) throw InvalidArgumentException(HERE) << "In CovarianceModelImplementation::setScale: the given scale has a dimension=" << scale.getDimension() << " different from the input dimension=" << spatialDimension_;
526526
for (UnsignedInteger index = 0; index < spatialDimension_; ++index)
527-
if (scale[index] <= 0)
527+
if (!(scale[index] > 0.0))
528528
throw InvalidArgumentException(HERE) << "In CovarianceModelImplementation::setScale: the component " << index << " of scale is non positive" ;
529529
scale_ = scale;
530530
}

python/src/CovarianceModelImplementation_doc.i.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ OT_CovarianceModel_set_nugget_factor_doc
553553
%define OT_CovarianceModel_setParameter_doc
554554
"Set the parameters of the covariance function.
555555

556-
Returns
557-
-------
558-
parameters : :class:`~openturns.PointWithDescription`
556+
Parameters
557+
----------
558+
parameters : :class:`~openturns.Point`
559559
List of the scale parameter :math:`\vect{\theta} \in \Rset^n` and the
560560
amplitude parameter :math:`\vect{\sigma} \in \Rset^d` of the covariance
561561
function.

0 commit comments

Comments
 (0)