ml-array-standard-deviation
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -16,5 +16,5 @@ 'use strict'; | ||
function standardDeviation(values, options = {}) { | ||
return Math.sqrt(variance(values, options)); | ||
return Math.sqrt(variance(values, options)); | ||
} | ||
module.exports = standardDeviation; |
{ | ||
"name": "ml-array-standard-deviation", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get the standard deviation in an array", | ||
@@ -23,4 +23,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"ml-array-variance": "^1.0.0" | ||
"ml-array-variance": "^1.0.1" | ||
} | ||
} |
@@ -5,6 +5,6 @@ import standardDeviation from '..'; | ||
test('standard deviation', () => { | ||
var s = standardDeviation(data); | ||
expect(s).toBeCloseTo(Math.sqrt(18.667), 3); | ||
expect(standardDeviation(data, {unbiased: true})).toBe(s); | ||
expect(standardDeviation(data, {unbiased: false})).toBe(Math.sqrt(14)); | ||
var s = standardDeviation(data); | ||
expect(s).toBeCloseTo(Math.sqrt(18.667), 3); | ||
expect(standardDeviation(data, { unbiased: true })).toBe(s); | ||
expect(standardDeviation(data, { unbiased: false })).toBe(Math.sqrt(14)); | ||
}); |
@@ -12,3 +12,3 @@ import variance from 'ml-array-variance'; | ||
export default function standardDeviation(values, options = {}) { | ||
return Math.sqrt(variance(values, options)); | ||
return Math.sqrt(variance(values, options)); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4226
7
1
Updatedml-array-variance@^1.0.1