[Pkg-javascript-commits] [science.js] 16/87: Fix another LOESS test.

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:11:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository science.js.

commit 9e1393426e0722349760be1ac5d1af28275be49c
Author: Jason Davies <jason at jasondavies.com>
Date:   Thu Aug 25 18:49:19 2011 +0100

    Fix another LOESS test.
---
 package.json             | 2 +-
 science.js               | 2 +-
 science.min.js           | 2 +-
 src/core/core.js         | 2 +-
 test/stats/loess-test.js | 6 +++---
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package.json b/package.json
index 824540b..1ca1c2a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "science.js",
-  "version": "1.3.2",
+  "version": "1.3.3",
   "description": "Scientific and statistical computing in JavaScript.",
   "keywords": ["science", "statistics", "mathematics"],
   "homepage": "https://github.com/jasondavies/science.js",
diff --git a/science.js b/science.js
index fc5d82c..32b3914 100644
--- a/science.js
+++ b/science.js
@@ -1,4 +1,4 @@
-(function(){science = {version: "1.3.2"}; // semver
+(function(){science = {version: "1.3.3"}; // semver
 science.functor = function(v) {
   return typeof v === "function" ? v : function() { return v; };
 };
diff --git a/science.min.js b/science.min.js
index a724200..b96a9ad 100644
--- a/science.min.js
+++ b/science.min.js
@@ -1 +1 @@
-(function(){science={version:"1.3.2"},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.zeroes=function(a){var b=-1,c=[];if(arguments.length===1)while(++b<a)c[b]=0;else while(++b<a)c[b]=science.zeroes.apply(this,Array.prototype.slice.call(arguments,1));return c}})()
\ No newline at end of file
+(function(){science={version:"1.3.3"},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.zeroes=function(a){var b=-1,c=[];if(arguments.length===1)while(++b<a)c[b]=0;else while(++b<a)c[b]=science.zeroes.apply(this,Array.prototype.slice.call(arguments,1));return c}})()
\ No newline at end of file
diff --git a/src/core/core.js b/src/core/core.js
index 232fbdb..f6b3df1 100644
--- a/src/core/core.js
+++ b/src/core/core.js
@@ -1 +1 @@
-science = {version: "1.3.2"}; // semver
+science = {version: "1.3.3"}; // semver
diff --git a/test/stats/loess-test.js b/test/stats/loess-test.js
index c9cc30c..91318fb 100644
--- a/test/stats/loess-test.js
+++ b/test/stats/loess-test.js
@@ -87,8 +87,8 @@ suite.addBatch({
       generateSineData(numPoints, xval, yval, xnoise, ynoise);
 
       // Introduce a couple of outliers
-      yval[numPoints / 3] *= 100;
-      yval[2 * numPoints / 3] *= -100;
+      yval[Math.floor(numPoints / 3)] *= 100;
+      yval[Math.floor(2 * numPoints / 3)] *= -100;
 
       // Check that variance decreases as the number of robustness
       // iterations increases
@@ -103,7 +103,7 @@ suite.addBatch({
         }
       }
 
-      for (var i = 2; i < variances.length; ++i) {
+      for (var i = 1; i < variances.length; ++i) {
         assert.isTrue(variances[i] < variances[i - 1]);
       }
     },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/science.js.git



More information about the Pkg-javascript-commits mailing list