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