Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-array-standard-deviation

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-array-standard-deviation - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

CHANGELOG.md

2

lib/index.js

@@ -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));
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc