Fixes CdfLibrary.js
This commit is contained in:
parent
4fc7723e32
commit
9349930ad8
|
@ -130,14 +130,11 @@ const {
|
||||||
function integral({ xs, ys }) {
|
function integral({ xs, ys }) {
|
||||||
if (_.includes(ys, NaN)) {
|
if (_.includes(ys, NaN)) {
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
} else if (_.includes(ys, Infinity) && _.includes(ys, -Infinity)) {
|
||||||
else if (_.includes(ys, Infinity) && _.includes(ys, -Infinity)){
|
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
} else if (_.includes(ys, Infinity)) {
|
||||||
else if (_.includes(ys, Infinity)){
|
|
||||||
return Infinity;
|
return Infinity;
|
||||||
}
|
} else if (_.includes(ys, -Infinity)) {
|
||||||
else if (_.includes(ys, -Infinity)){
|
|
||||||
return -Infinity;
|
return -Infinity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,4 +168,3 @@ const {
|
||||||
differentialEntropy,
|
differentialEntropy,
|
||||||
integral,
|
integral,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user