Spreadsheet: Fix for issue #2647, stddev does not work with arrays.

This commit is contained in:
Eivind Kvedalen
2016-11-12 08:28:21 +01:00
committed by wmayer
parent 30390b70a7
commit b398069372
2 changed files with 5 additions and 4 deletions

View File

@@ -681,9 +681,6 @@ FunctionExpression::FunctionExpression(const DocumentObject *_owner, Function _f
throw ExpressionError("Invalid number of arguments: eaxctly two required.");
break;
case STDDEV:
if (args.size() < 2)
throw ExpressionError("Invalid number of arguments: at least two required.");
break;
case SUM:
case AVERAGE:
case COUNT:
@@ -796,7 +793,7 @@ public:
virtual Quantity getQuantity() const {
if (n < 2)
return Quantity();
throw ExpressionError("Invalid number of entries: at least two required.");
else
return (M2 / (n - 1.0)).pow(Quantity(0.5));
}