mathjs 11.5.0 → 11.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/HISTORY.md +18 -0
  2. package/NOTICE +1 -1
  3. package/README.md +2 -2
  4. package/bin/cli.js +1 -1
  5. package/lib/browser/math.js +1 -1
  6. package/lib/browser/math.js.LICENSE.txt +3 -3
  7. package/lib/browser/math.js.map +1 -1
  8. package/lib/cjs/expression/embeddedDocs/function/arithmetic/invmod.js +1 -1
  9. package/lib/cjs/expression/embeddedDocs/function/arithmetic/pow.js +1 -1
  10. package/lib/cjs/expression/embeddedDocs/function/matrix/matrixFromColumns.js +1 -1
  11. package/lib/cjs/expression/embeddedDocs/function/matrix/matrixFromFunction.js +1 -1
  12. package/lib/cjs/expression/embeddedDocs/function/matrix/matrixFromRows.js +1 -1
  13. package/lib/cjs/expression/embeddedDocs/function/matrix/rotate.js +1 -1
  14. package/lib/cjs/expression/embeddedDocs/function/probability/lgamma.js +1 -1
  15. package/lib/cjs/expression/embeddedDocs/function/statistics/max.js +1 -1
  16. package/lib/cjs/expression/embeddedDocs/function/statistics/mean.js +1 -1
  17. package/lib/cjs/expression/embeddedDocs/function/statistics/min.js +1 -1
  18. package/lib/cjs/expression/embeddedDocs/function/statistics/std.js +1 -1
  19. package/lib/cjs/expression/embeddedDocs/function/statistics/sum.js +1 -1
  20. package/lib/cjs/expression/embeddedDocs/function/statistics/variance.js +1 -1
  21. package/lib/cjs/function/statistics/max.js +2 -2
  22. package/lib/cjs/function/statistics/mean.js +2 -2
  23. package/lib/cjs/function/statistics/min.js +2 -2
  24. package/lib/cjs/function/statistics/mode.js +1 -1
  25. package/lib/cjs/function/statistics/prod.js +1 -1
  26. package/lib/cjs/function/statistics/quantileSeq.js +1 -1
  27. package/lib/cjs/function/statistics/sum.js +3 -2
  28. package/lib/cjs/function/statistics/variance.js +1 -1
  29. package/lib/cjs/header.js +3 -3
  30. package/lib/cjs/version.js +1 -1
  31. package/lib/esm/expression/embeddedDocs/function/arithmetic/invmod.js +1 -1
  32. package/lib/esm/expression/embeddedDocs/function/arithmetic/pow.js +1 -1
  33. package/lib/esm/expression/embeddedDocs/function/matrix/matrixFromColumns.js +1 -1
  34. package/lib/esm/expression/embeddedDocs/function/matrix/matrixFromFunction.js +1 -1
  35. package/lib/esm/expression/embeddedDocs/function/matrix/matrixFromRows.js +1 -1
  36. package/lib/esm/expression/embeddedDocs/function/matrix/rotate.js +1 -1
  37. package/lib/esm/expression/embeddedDocs/function/probability/lgamma.js +1 -1
  38. package/lib/esm/expression/embeddedDocs/function/statistics/max.js +1 -1
  39. package/lib/esm/expression/embeddedDocs/function/statistics/mean.js +1 -1
  40. package/lib/esm/expression/embeddedDocs/function/statistics/min.js +1 -1
  41. package/lib/esm/expression/embeddedDocs/function/statistics/std.js +1 -1
  42. package/lib/esm/expression/embeddedDocs/function/statistics/sum.js +1 -1
  43. package/lib/esm/expression/embeddedDocs/function/statistics/variance.js +1 -1
  44. package/lib/esm/function/statistics/max.js +2 -2
  45. package/lib/esm/function/statistics/mean.js +2 -2
  46. package/lib/esm/function/statistics/min.js +2 -2
  47. package/lib/esm/function/statistics/mode.js +1 -1
  48. package/lib/esm/function/statistics/prod.js +1 -1
  49. package/lib/esm/function/statistics/quantileSeq.js +1 -1
  50. package/lib/esm/function/statistics/sum.js +3 -2
  51. package/lib/esm/function/statistics/variance.js +1 -1
  52. package/lib/esm/header.js +1 -1
  53. package/lib/esm/version.js +1 -1
  54. package/package.json +19 -21
  55. package/types/index.d.ts +66 -9
@@ -9,7 +9,7 @@ var invmodDocs = {
9
9
  category: 'Arithmetic',
10
10
  syntax: ['invmod(a, b)'],
11
11
  description: 'Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)',
12
- examples: ['invmod(8, 12)=NaN', 'invmod(7, 13)=2', 'math.invmod(15151, 15122)=10429'],
12
+ examples: ['invmod(8, 12)=NaN', 'invmod(7, 13)=2', 'invmod(15151, 15122)=10429'],
13
13
  seealso: ['gcd', 'xgcd']
14
14
  };
15
15
  exports.invmodDocs = invmodDocs;
@@ -9,7 +9,7 @@ var powDocs = {
9
9
  category: 'Operators',
10
10
  syntax: ['x ^ y', 'pow(x, y)'],
11
11
  description: 'Calculates the power of x to y, x^y.',
12
- examples: ['2^3', '2*2*2', '1 + e ^ (pi * i)', 'math.pow([[1, 2], [4, 3]], 2)', 'math.pow([[1, 2], [4, 3]], -1)'],
12
+ examples: ['2^3', '2*2*2', '1 + e ^ (pi * i)', 'pow([[1, 2], [4, 3]], 2)', 'pow([[1, 2], [4, 3]], -1)'],
13
13
  seealso: ['multiply', 'nthRoot', 'nthRoots', 'sqrt']
14
14
  };
15
15
  exports.powDocs = powDocs;
@@ -7,7 +7,7 @@ exports.matrixFromColumnsDocs = void 0;
7
7
  var matrixFromColumnsDocs = {
8
8
  name: 'matrixFromColumns',
9
9
  category: 'Matrix',
10
- syntax: ['math.matrixFromColumns(...arr)', 'math.matrixFromColumns(row1, row2)', 'math.matrixFromColumns(row1, row2, row3)'],
10
+ syntax: ['matrixFromColumns(...arr)', 'matrixFromColumns(row1, row2)', 'matrixFromColumns(row1, row2, row3)'],
11
11
  description: 'Create a dense matrix from vectors as individual columns.',
12
12
  examples: ['matrixFromColumns([1, 2, 3], [[4],[5],[6]])'],
13
13
  seealso: ['matrix', 'matrixFromRows', 'matrixFromFunction', 'zeros']
@@ -7,7 +7,7 @@ exports.matrixFromFunctionDocs = void 0;
7
7
  var matrixFromFunctionDocs = {
8
8
  name: 'matrixFromFunction',
9
9
  category: 'Matrix',
10
- syntax: ['math.matrixFromFunction(size, fn)', 'math.matrixFromFunction(size, fn, format)', 'math.matrixFromFunction(size, fn, format, datatype)', 'math.matrixFromFunction(size, format, fn)', 'math.matrixFromFunction(size, format, datatype, fn)'],
10
+ syntax: ['matrixFromFunction(size, fn)', 'matrixFromFunction(size, fn, format)', 'matrixFromFunction(size, fn, format, datatype)', 'matrixFromFunction(size, format, fn)', 'matrixFromFunction(size, format, datatype, fn)'],
11
11
  description: 'Create a matrix by evaluating a generating function at each index.',
12
12
  examples: ['f(I) = I[1] - I[2]', 'matrixFromFunction([3,3], f)', 'g(I) = I[1] - I[2] == 1 ? 4 : 0', 'matrixFromFunction([100, 100], "sparse", g)', 'matrixFromFunction([5], random)'],
13
13
  seealso: ['matrix', 'matrixFromRows', 'matrixFromColumns', 'zeros']
@@ -7,7 +7,7 @@ exports.matrixFromRowsDocs = void 0;
7
7
  var matrixFromRowsDocs = {
8
8
  name: 'matrixFromRows',
9
9
  category: 'Matrix',
10
- syntax: ['math.matrixFromRows(...arr)', 'math.matrixFromRows(row1, row2)', 'math.matrixFromRows(row1, row2, row3)'],
10
+ syntax: ['matrixFromRows(...arr)', 'matrixFromRows(row1, row2)', 'matrixFromRows(row1, row2, row3)'],
11
11
  description: 'Create a dense matrix from vectors as individual rows.',
12
12
  examples: ['matrixFromRows([1, 2, 3], [[4],[5],[6]])'],
13
13
  seealso: ['matrix', 'matrixFromColumns', 'matrixFromFunction', 'zeros']
@@ -9,7 +9,7 @@ var rotateDocs = {
9
9
  category: 'Matrix',
10
10
  syntax: ['rotate(w, theta)', 'rotate(w, theta, v)'],
11
11
  description: 'Returns a 2-D rotation matrix (2x2) for a given angle (in radians). ' + 'Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.',
12
- examples: ['rotate([1, 0], math.pi / 2)', 'rotate(matrix([1, 0]), unit("35deg"))', 'rotate([1, 0, 0], unit("90deg"), [0, 0, 1])', 'rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],
12
+ examples: ['rotate([1, 0], pi / 2)', 'rotate(matrix([1, 0]), unit("35deg"))', 'rotate([1, 0, 0], unit("90deg"), [0, 0, 1])', 'rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],
13
13
  seealso: ['matrix', 'rotationMatrix']
14
14
  };
15
15
  exports.rotateDocs = rotateDocs;
@@ -9,7 +9,7 @@ var lgammaDocs = {
9
9
  category: 'Probability',
10
10
  syntax: ['lgamma(n)'],
11
11
  description: 'Logarithm of the gamma function for real, positive numbers and complex numbers, ' + 'using Lanczos approximation for numbers and Stirling series for complex numbers.',
12
- examples: ['lgamma(4)', 'lgamma(1/2)', 'lgamma(math.i)', 'lgamma(complex(1.1, 2))'],
12
+ examples: ['lgamma(4)', 'lgamma(1/2)', 'lgamma(i)', 'lgamma(complex(1.1, 2))'],
13
13
  seealso: ['gamma']
14
14
  };
15
15
  exports.lgammaDocs = lgammaDocs;
@@ -7,7 +7,7 @@ exports.maxDocs = void 0;
7
7
  var maxDocs = {
8
8
  name: 'max',
9
9
  category: 'Statistics',
10
- syntax: ['max(a, b, c, ...)', 'max(A)', 'max(A, dim)'],
10
+ syntax: ['max(a, b, c, ...)', 'max(A)', 'max(A, dimension)'],
11
11
  description: 'Compute the maximum value of a list of values.',
12
12
  examples: ['max(2, 3, 4, 1)', 'max([2, 3, 4, 1])', 'max([2, 5; 4, 3])', 'max([2, 5; 4, 3], 1)', 'max([2, 5; 4, 3], 2)', 'max(2.7, 7.1, -4.5, 2.0, 4.1)', 'min(2.7, 7.1, -4.5, 2.0, 4.1)'],
13
13
  seealso: ['mean', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -7,7 +7,7 @@ exports.meanDocs = void 0;
7
7
  var meanDocs = {
8
8
  name: 'mean',
9
9
  category: 'Statistics',
10
- syntax: ['mean(a, b, c, ...)', 'mean(A)', 'mean(A, dim)'],
10
+ syntax: ['mean(a, b, c, ...)', 'mean(A)', 'mean(A, dimension)'],
11
11
  description: 'Compute the arithmetic mean of a list of values.',
12
12
  examples: ['mean(2, 3, 4, 1)', 'mean([2, 3, 4, 1])', 'mean([2, 5; 4, 3])', 'mean([2, 5; 4, 3], 1)', 'mean([2, 5; 4, 3], 2)', 'mean([1.0, 2.7, 3.2, 4.0])'],
13
13
  seealso: ['max', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -7,7 +7,7 @@ exports.minDocs = void 0;
7
7
  var minDocs = {
8
8
  name: 'min',
9
9
  category: 'Statistics',
10
- syntax: ['min(a, b, c, ...)', 'min(A)', 'min(A, dim)'],
10
+ syntax: ['min(a, b, c, ...)', 'min(A)', 'min(A, dimension)'],
11
11
  description: 'Compute the minimum value of a list of values.',
12
12
  examples: ['min(2, 3, 4, 1)', 'min([2, 3, 4, 1])', 'min([2, 5; 4, 3])', 'min([2, 5; 4, 3], 1)', 'min([2, 5; 4, 3], 2)', 'min(2.7, 7.1, -4.5, 2.0, 4.1)', 'max(2.7, 7.1, -4.5, 2.0, 4.1)'],
13
13
  seealso: ['max', 'mean', 'median', 'prod', 'std', 'sum', 'variance']
@@ -7,7 +7,7 @@ exports.stdDocs = void 0;
7
7
  var stdDocs = {
8
8
  name: 'std',
9
9
  category: 'Statistics',
10
- syntax: ['std(a, b, c, ...)', 'std(A)', 'std(A, normalization)'],
10
+ syntax: ['std(a, b, c, ...)', 'std(A)', 'std(A, dimension)', 'std(A, normalization)', 'std(A, dimension, normalization)'],
11
11
  description: 'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',
12
12
  examples: ['std(2, 4, 6)', 'std([2, 4, 6, 8])', 'std([2, 4, 6, 8], "uncorrected")', 'std([2, 4, 6, 8], "biased")', 'std([1, 2, 3; 4, 5, 6])'],
13
13
  seealso: ['max', 'mean', 'min', 'median', 'prod', 'sum', 'variance']
@@ -7,7 +7,7 @@ exports.sumDocs = void 0;
7
7
  var sumDocs = {
8
8
  name: 'sum',
9
9
  category: 'Statistics',
10
- syntax: ['sum(a, b, c, ...)', 'sum(A)'],
10
+ syntax: ['sum(a, b, c, ...)', 'sum(A)', 'sum(A, dimension)'],
11
11
  description: 'Compute the sum of all values.',
12
12
  examples: ['sum(2, 3, 4, 1)', 'sum([2, 3, 4, 1])', 'sum([2, 5; 4, 3])'],
13
13
  seealso: ['max', 'mean', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -7,7 +7,7 @@ exports.varianceDocs = void 0;
7
7
  var varianceDocs = {
8
8
  name: 'variance',
9
9
  category: 'Statistics',
10
- syntax: ['variance(a, b, c, ...)', 'variance(A)', 'variance(A, normalization)'],
10
+ syntax: ['variance(a, b, c, ...)', 'variance(A)', 'variance(A, dimension)', 'variance(A, normalization)', 'variance(A, dimension, normalization)'],
11
11
  description: 'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',
12
12
  examples: ['variance(2, 4, 6)', 'variance([2, 4, 6, 8])', 'variance([2, 4, 6, 8], "uncorrected")', 'variance([2, 4, 6, 8], "biased")', 'variance([1, 2, 3; 4, 5, 6])'],
13
13
  seealso: ['max', 'mean', 'min', 'median', 'min', 'prod', 'std', 'sum']
@@ -16,7 +16,7 @@ var createMax = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
16
16
  larger = _ref.larger;
17
17
  /**
18
18
  * Compute the maximum value of a matrix or a list with values.
19
- * In case of a multi dimensional array, the maximum of the flattened array
19
+ * In case of a multidimensional array, the maximum of the flattened array
20
20
  * will be calculated. When `dim` is provided, the maximum over the selected
21
21
  * dimension will be calculated. Parameter `dim` is zero-based.
22
22
  *
@@ -24,7 +24,7 @@ var createMax = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
24
24
  *
25
25
  * math.max(a, b, c, ...)
26
26
  * math.max(A)
27
- * math.max(A, dim)
27
+ * math.max(A, dimension)
28
28
  *
29
29
  * Examples:
30
30
  *
@@ -16,7 +16,7 @@ var createMean = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functi
16
16
  divide = _ref.divide;
17
17
  /**
18
18
  * Compute the mean value of matrix or a list with values.
19
- * In case of a multi dimensional array, the mean of the flattened array
19
+ * In case of a multidimensional array, the mean of the flattened array
20
20
  * will be calculated. When `dim` is provided, the maximum over the selected
21
21
  * dimension will be calculated. Parameter `dim` is zero-based.
22
22
  *
@@ -24,7 +24,7 @@ var createMean = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functi
24
24
  *
25
25
  * math.mean(a, b, c, ...)
26
26
  * math.mean(A)
27
- * math.mean(A, dim)
27
+ * math.mean(A, dimension)
28
28
  *
29
29
  * Examples:
30
30
  *
@@ -16,7 +16,7 @@ var createMin = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
16
16
  smaller = _ref.smaller;
17
17
  /**
18
18
  * Compute the minimum value of a matrix or a list of values.
19
- * In case of a multi dimensional array, the minimum of the flattened array
19
+ * In case of a multidimensional array, the minimum of the flattened array
20
20
  * will be calculated. When `dim` is provided, the minimum over the selected
21
21
  * dimension will be calculated. Parameter `dim` is zero-based.
22
22
  *
@@ -24,7 +24,7 @@ var createMin = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
24
24
  *
25
25
  * math.min(a, b, c, ...)
26
26
  * math.min(A)
27
- * math.min(A, dim)
27
+ * math.min(A, dimension)
28
28
  *
29
29
  * Examples:
30
30
  *
@@ -14,7 +14,7 @@ var createMode = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functi
14
14
  isNumeric = _ref.isNumeric;
15
15
  /**
16
16
  * Computes the mode of a set of numbers or a list with values(numbers or characters).
17
- * If there are more than one modes, it returns a list of those values.
17
+ * If there are multiple modes, it returns a list of those values.
18
18
  *
19
19
  * Syntax:
20
20
  *
@@ -16,7 +16,7 @@ var createProd = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functi
16
16
  numeric = _ref.numeric;
17
17
  /**
18
18
  * Compute the product of a matrix or a list with values.
19
- * In case of a (multi dimensional) array or matrix, the sum of all
19
+ * In case of a multidimensional array or matrix, the sum of all
20
20
  * elements will be calculated.
21
21
  *
22
22
  * Syntax:
@@ -22,7 +22,7 @@ var createQuantileSeq = /* #__PURE__ */(0, _factory.factory)(name, dependencies,
22
22
  * Supported types of sequence values are: Number, BigNumber, Unit
23
23
  * Supported types of probability are: Number, BigNumber
24
24
  *
25
- * In case of a (multi dimensional) array or matrix, the prob order quantile
25
+ * In case of a multidimensional array or matrix, the prob order quantile
26
26
  * of all elements will be calculated.
27
27
  *
28
28
  * Syntax:
@@ -16,13 +16,14 @@ var createSum = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
16
16
  numeric = _ref.numeric;
17
17
  /**
18
18
  * Compute the sum of a matrix or a list with values.
19
- * In case of a (multi dimensional) array or matrix, the sum of all
19
+ * In case of a multidimensional array or matrix, the sum of all
20
20
  * elements will be calculated.
21
21
  *
22
22
  * Syntax:
23
23
  *
24
24
  * math.sum(a, b, c, ...)
25
25
  * math.sum(A)
26
+ * math.sum(A, dimension)
26
27
  *
27
28
  * Examples:
28
29
  *
@@ -34,7 +35,7 @@ var createSum = /* #__PURE__ */(0, _factory.factory)(name, dependencies, functio
34
35
  *
35
36
  * mean, median, min, max, prod, std, variance, cumsum
36
37
  *
37
- * @param {... *} args A single matrix or or multiple scalar values
38
+ * @param {... *} args A single matrix or multiple scalar values
38
39
  * @return {*} The sum of all values
39
40
  */
40
41
  return typed(name, {
@@ -21,7 +21,7 @@ var createVariance = /* #__PURE__ */(0, _factory.factory)(name, dependencies, fu
21
21
  isNaN = _ref.isNaN;
22
22
  /**
23
23
  * Compute the variance of a matrix or a list with values.
24
- * In case of a (multi dimensional) array or matrix, the variance over all
24
+ * In case of a multidimensional array or matrix, the variance over all
25
25
  * elements will be calculated.
26
26
  *
27
27
  * Additionally, it is possible to compute the variance along the rows
package/lib/cjs/header.js CHANGED
@@ -6,11 +6,11 @@
6
6
  * It features real and complex numbers, units, matrices, a large set of
7
7
  * mathematical functions, and a flexible expression parser.
8
8
  *
9
- * @version 11.5.0
10
- * @date 2022-12-05
9
+ * @version 11.5.1
10
+ * @date 2023-01-31
11
11
  *
12
12
  * @license
13
- * Copyright (C) 2013-2022 Jos de Jong <wjosdejong@gmail.com>
13
+ * Copyright (C) 2013-2023 Jos de Jong <wjosdejong@gmail.com>
14
14
  *
15
15
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
16
16
  * use this file except in compliance with the License. You may obtain a copy
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = '11.5.0';
7
+ var version = '11.5.1';
8
8
  // Note: This file is automatically generated when building math.js.
9
9
  // Changes made in this file will be overwritten.
10
10
  exports.version = version;
@@ -3,6 +3,6 @@ export var invmodDocs = {
3
3
  category: 'Arithmetic',
4
4
  syntax: ['invmod(a, b)'],
5
5
  description: 'Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)',
6
- examples: ['invmod(8, 12)=NaN', 'invmod(7, 13)=2', 'math.invmod(15151, 15122)=10429'],
6
+ examples: ['invmod(8, 12)=NaN', 'invmod(7, 13)=2', 'invmod(15151, 15122)=10429'],
7
7
  seealso: ['gcd', 'xgcd']
8
8
  };
@@ -3,6 +3,6 @@ export var powDocs = {
3
3
  category: 'Operators',
4
4
  syntax: ['x ^ y', 'pow(x, y)'],
5
5
  description: 'Calculates the power of x to y, x^y.',
6
- examples: ['2^3', '2*2*2', '1 + e ^ (pi * i)', 'math.pow([[1, 2], [4, 3]], 2)', 'math.pow([[1, 2], [4, 3]], -1)'],
6
+ examples: ['2^3', '2*2*2', '1 + e ^ (pi * i)', 'pow([[1, 2], [4, 3]], 2)', 'pow([[1, 2], [4, 3]], -1)'],
7
7
  seealso: ['multiply', 'nthRoot', 'nthRoots', 'sqrt']
8
8
  };
@@ -1,7 +1,7 @@
1
1
  export var matrixFromColumnsDocs = {
2
2
  name: 'matrixFromColumns',
3
3
  category: 'Matrix',
4
- syntax: ['math.matrixFromColumns(...arr)', 'math.matrixFromColumns(row1, row2)', 'math.matrixFromColumns(row1, row2, row3)'],
4
+ syntax: ['matrixFromColumns(...arr)', 'matrixFromColumns(row1, row2)', 'matrixFromColumns(row1, row2, row3)'],
5
5
  description: 'Create a dense matrix from vectors as individual columns.',
6
6
  examples: ['matrixFromColumns([1, 2, 3], [[4],[5],[6]])'],
7
7
  seealso: ['matrix', 'matrixFromRows', 'matrixFromFunction', 'zeros']
@@ -1,7 +1,7 @@
1
1
  export var matrixFromFunctionDocs = {
2
2
  name: 'matrixFromFunction',
3
3
  category: 'Matrix',
4
- syntax: ['math.matrixFromFunction(size, fn)', 'math.matrixFromFunction(size, fn, format)', 'math.matrixFromFunction(size, fn, format, datatype)', 'math.matrixFromFunction(size, format, fn)', 'math.matrixFromFunction(size, format, datatype, fn)'],
4
+ syntax: ['matrixFromFunction(size, fn)', 'matrixFromFunction(size, fn, format)', 'matrixFromFunction(size, fn, format, datatype)', 'matrixFromFunction(size, format, fn)', 'matrixFromFunction(size, format, datatype, fn)'],
5
5
  description: 'Create a matrix by evaluating a generating function at each index.',
6
6
  examples: ['f(I) = I[1] - I[2]', 'matrixFromFunction([3,3], f)', 'g(I) = I[1] - I[2] == 1 ? 4 : 0', 'matrixFromFunction([100, 100], "sparse", g)', 'matrixFromFunction([5], random)'],
7
7
  seealso: ['matrix', 'matrixFromRows', 'matrixFromColumns', 'zeros']
@@ -1,7 +1,7 @@
1
1
  export var matrixFromRowsDocs = {
2
2
  name: 'matrixFromRows',
3
3
  category: 'Matrix',
4
- syntax: ['math.matrixFromRows(...arr)', 'math.matrixFromRows(row1, row2)', 'math.matrixFromRows(row1, row2, row3)'],
4
+ syntax: ['matrixFromRows(...arr)', 'matrixFromRows(row1, row2)', 'matrixFromRows(row1, row2, row3)'],
5
5
  description: 'Create a dense matrix from vectors as individual rows.',
6
6
  examples: ['matrixFromRows([1, 2, 3], [[4],[5],[6]])'],
7
7
  seealso: ['matrix', 'matrixFromColumns', 'matrixFromFunction', 'zeros']
@@ -3,6 +3,6 @@ export var rotateDocs = {
3
3
  category: 'Matrix',
4
4
  syntax: ['rotate(w, theta)', 'rotate(w, theta, v)'],
5
5
  description: 'Returns a 2-D rotation matrix (2x2) for a given angle (in radians). ' + 'Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.',
6
- examples: ['rotate([1, 0], math.pi / 2)', 'rotate(matrix([1, 0]), unit("35deg"))', 'rotate([1, 0, 0], unit("90deg"), [0, 0, 1])', 'rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],
6
+ examples: ['rotate([1, 0], pi / 2)', 'rotate(matrix([1, 0]), unit("35deg"))', 'rotate([1, 0, 0], unit("90deg"), [0, 0, 1])', 'rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],
7
7
  seealso: ['matrix', 'rotationMatrix']
8
8
  };
@@ -3,6 +3,6 @@ export var lgammaDocs = {
3
3
  category: 'Probability',
4
4
  syntax: ['lgamma(n)'],
5
5
  description: 'Logarithm of the gamma function for real, positive numbers and complex numbers, ' + 'using Lanczos approximation for numbers and Stirling series for complex numbers.',
6
- examples: ['lgamma(4)', 'lgamma(1/2)', 'lgamma(math.i)', 'lgamma(complex(1.1, 2))'],
6
+ examples: ['lgamma(4)', 'lgamma(1/2)', 'lgamma(i)', 'lgamma(complex(1.1, 2))'],
7
7
  seealso: ['gamma']
8
8
  };
@@ -1,7 +1,7 @@
1
1
  export var maxDocs = {
2
2
  name: 'max',
3
3
  category: 'Statistics',
4
- syntax: ['max(a, b, c, ...)', 'max(A)', 'max(A, dim)'],
4
+ syntax: ['max(a, b, c, ...)', 'max(A)', 'max(A, dimension)'],
5
5
  description: 'Compute the maximum value of a list of values.',
6
6
  examples: ['max(2, 3, 4, 1)', 'max([2, 3, 4, 1])', 'max([2, 5; 4, 3])', 'max([2, 5; 4, 3], 1)', 'max([2, 5; 4, 3], 2)', 'max(2.7, 7.1, -4.5, 2.0, 4.1)', 'min(2.7, 7.1, -4.5, 2.0, 4.1)'],
7
7
  seealso: ['mean', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -1,7 +1,7 @@
1
1
  export var meanDocs = {
2
2
  name: 'mean',
3
3
  category: 'Statistics',
4
- syntax: ['mean(a, b, c, ...)', 'mean(A)', 'mean(A, dim)'],
4
+ syntax: ['mean(a, b, c, ...)', 'mean(A)', 'mean(A, dimension)'],
5
5
  description: 'Compute the arithmetic mean of a list of values.',
6
6
  examples: ['mean(2, 3, 4, 1)', 'mean([2, 3, 4, 1])', 'mean([2, 5; 4, 3])', 'mean([2, 5; 4, 3], 1)', 'mean([2, 5; 4, 3], 2)', 'mean([1.0, 2.7, 3.2, 4.0])'],
7
7
  seealso: ['max', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -1,7 +1,7 @@
1
1
  export var minDocs = {
2
2
  name: 'min',
3
3
  category: 'Statistics',
4
- syntax: ['min(a, b, c, ...)', 'min(A)', 'min(A, dim)'],
4
+ syntax: ['min(a, b, c, ...)', 'min(A)', 'min(A, dimension)'],
5
5
  description: 'Compute the minimum value of a list of values.',
6
6
  examples: ['min(2, 3, 4, 1)', 'min([2, 3, 4, 1])', 'min([2, 5; 4, 3])', 'min([2, 5; 4, 3], 1)', 'min([2, 5; 4, 3], 2)', 'min(2.7, 7.1, -4.5, 2.0, 4.1)', 'max(2.7, 7.1, -4.5, 2.0, 4.1)'],
7
7
  seealso: ['max', 'mean', 'median', 'prod', 'std', 'sum', 'variance']
@@ -1,7 +1,7 @@
1
1
  export var stdDocs = {
2
2
  name: 'std',
3
3
  category: 'Statistics',
4
- syntax: ['std(a, b, c, ...)', 'std(A)', 'std(A, normalization)'],
4
+ syntax: ['std(a, b, c, ...)', 'std(A)', 'std(A, dimension)', 'std(A, normalization)', 'std(A, dimension, normalization)'],
5
5
  description: 'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',
6
6
  examples: ['std(2, 4, 6)', 'std([2, 4, 6, 8])', 'std([2, 4, 6, 8], "uncorrected")', 'std([2, 4, 6, 8], "biased")', 'std([1, 2, 3; 4, 5, 6])'],
7
7
  seealso: ['max', 'mean', 'min', 'median', 'prod', 'sum', 'variance']
@@ -1,7 +1,7 @@
1
1
  export var sumDocs = {
2
2
  name: 'sum',
3
3
  category: 'Statistics',
4
- syntax: ['sum(a, b, c, ...)', 'sum(A)'],
4
+ syntax: ['sum(a, b, c, ...)', 'sum(A)', 'sum(A, dimension)'],
5
5
  description: 'Compute the sum of all values.',
6
6
  examples: ['sum(2, 3, 4, 1)', 'sum([2, 3, 4, 1])', 'sum([2, 5; 4, 3])'],
7
7
  seealso: ['max', 'mean', 'median', 'min', 'prod', 'std', 'sum', 'variance']
@@ -1,7 +1,7 @@
1
1
  export var varianceDocs = {
2
2
  name: 'variance',
3
3
  category: 'Statistics',
4
- syntax: ['variance(a, b, c, ...)', 'variance(A)', 'variance(A, normalization)'],
4
+ syntax: ['variance(a, b, c, ...)', 'variance(A)', 'variance(A, dimension)', 'variance(A, normalization)', 'variance(A, dimension, normalization)'],
5
5
  description: 'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',
6
6
  examples: ['variance(2, 4, 6)', 'variance([2, 4, 6, 8])', 'variance([2, 4, 6, 8], "uncorrected")', 'variance([2, 4, 6, 8], "biased")', 'variance([1, 2, 3; 4, 5, 6])'],
7
7
  seealso: ['max', 'mean', 'min', 'median', 'min', 'prod', 'std', 'sum']
@@ -12,7 +12,7 @@ export var createMax = /* #__PURE__ */factory(name, dependencies, _ref => {
12
12
  } = _ref;
13
13
  /**
14
14
  * Compute the maximum value of a matrix or a list with values.
15
- * In case of a multi dimensional array, the maximum of the flattened array
15
+ * In case of a multidimensional array, the maximum of the flattened array
16
16
  * will be calculated. When `dim` is provided, the maximum over the selected
17
17
  * dimension will be calculated. Parameter `dim` is zero-based.
18
18
  *
@@ -20,7 +20,7 @@ export var createMax = /* #__PURE__ */factory(name, dependencies, _ref => {
20
20
  *
21
21
  * math.max(a, b, c, ...)
22
22
  * math.max(A)
23
- * math.max(A, dim)
23
+ * math.max(A, dimension)
24
24
  *
25
25
  * Examples:
26
26
  *
@@ -12,7 +12,7 @@ export var createMean = /* #__PURE__ */factory(name, dependencies, _ref => {
12
12
  } = _ref;
13
13
  /**
14
14
  * Compute the mean value of matrix or a list with values.
15
- * In case of a multi dimensional array, the mean of the flattened array
15
+ * In case of a multidimensional array, the mean of the flattened array
16
16
  * will be calculated. When `dim` is provided, the maximum over the selected
17
17
  * dimension will be calculated. Parameter `dim` is zero-based.
18
18
  *
@@ -20,7 +20,7 @@ export var createMean = /* #__PURE__ */factory(name, dependencies, _ref => {
20
20
  *
21
21
  * math.mean(a, b, c, ...)
22
22
  * math.mean(A)
23
- * math.mean(A, dim)
23
+ * math.mean(A, dimension)
24
24
  *
25
25
  * Examples:
26
26
  *
@@ -12,7 +12,7 @@ export var createMin = /* #__PURE__ */factory(name, dependencies, _ref => {
12
12
  } = _ref;
13
13
  /**
14
14
  * Compute the minimum value of a matrix or a list of values.
15
- * In case of a multi dimensional array, the minimum of the flattened array
15
+ * In case of a multidimensional array, the minimum of the flattened array
16
16
  * will be calculated. When `dim` is provided, the minimum over the selected
17
17
  * dimension will be calculated. Parameter `dim` is zero-based.
18
18
  *
@@ -20,7 +20,7 @@ export var createMin = /* #__PURE__ */factory(name, dependencies, _ref => {
20
20
  *
21
21
  * math.min(a, b, c, ...)
22
22
  * math.min(A)
23
- * math.min(A, dim)
23
+ * math.min(A, dimension)
24
24
  *
25
25
  * Examples:
26
26
  *
@@ -10,7 +10,7 @@ export var createMode = /* #__PURE__ */factory(name, dependencies, _ref => {
10
10
  } = _ref;
11
11
  /**
12
12
  * Computes the mode of a set of numbers or a list with values(numbers or characters).
13
- * If there are more than one modes, it returns a list of those values.
13
+ * If there are multiple modes, it returns a list of those values.
14
14
  *
15
15
  * Syntax:
16
16
  *
@@ -12,7 +12,7 @@ export var createProd = /* #__PURE__ */factory(name, dependencies, _ref => {
12
12
  } = _ref;
13
13
  /**
14
14
  * Compute the product of a matrix or a list with values.
15
- * In case of a (multi dimensional) array or matrix, the sum of all
15
+ * In case of a multidimensional array or matrix, the sum of all
16
16
  * elements will be calculated.
17
17
  *
18
18
  * Syntax:
@@ -18,7 +18,7 @@ export var createQuantileSeq = /* #__PURE__ */factory(name, dependencies, _ref =
18
18
  * Supported types of sequence values are: Number, BigNumber, Unit
19
19
  * Supported types of probability are: Number, BigNumber
20
20
  *
21
- * In case of a (multi dimensional) array or matrix, the prob order quantile
21
+ * In case of a multidimensional array or matrix, the prob order quantile
22
22
  * of all elements will be calculated.
23
23
  *
24
24
  * Syntax:
@@ -12,13 +12,14 @@ export var createSum = /* #__PURE__ */factory(name, dependencies, _ref => {
12
12
  } = _ref;
13
13
  /**
14
14
  * Compute the sum of a matrix or a list with values.
15
- * In case of a (multi dimensional) array or matrix, the sum of all
15
+ * In case of a multidimensional array or matrix, the sum of all
16
16
  * elements will be calculated.
17
17
  *
18
18
  * Syntax:
19
19
  *
20
20
  * math.sum(a, b, c, ...)
21
21
  * math.sum(A)
22
+ * math.sum(A, dimension)
22
23
  *
23
24
  * Examples:
24
25
  *
@@ -30,7 +31,7 @@ export var createSum = /* #__PURE__ */factory(name, dependencies, _ref => {
30
31
  *
31
32
  * mean, median, min, max, prod, std, variance, cumsum
32
33
  *
33
- * @param {... *} args A single matrix or or multiple scalar values
34
+ * @param {... *} args A single matrix or multiple scalar values
34
35
  * @return {*} The sum of all values
35
36
  */
36
37
  return typed(name, {
@@ -17,7 +17,7 @@ export var createVariance = /* #__PURE__ */factory(name, dependencies, _ref => {
17
17
  } = _ref;
18
18
  /**
19
19
  * Compute the variance of a matrix or a list with values.
20
- * In case of a (multi dimensional) array or matrix, the variance over all
20
+ * In case of a multidimensional array or matrix, the variance over all
21
21
  * elements will be calculated.
22
22
  *
23
23
  * Additionally, it is possible to compute the variance along the rows
package/lib/esm/header.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * @date @@date
11
11
  *
12
12
  * @license
13
- * Copyright (C) 2013-2022 Jos de Jong <wjosdejong@gmail.com>
13
+ * Copyright (C) 2013-2023 Jos de Jong <wjosdejong@gmail.com>
14
14
  *
15
15
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
16
16
  * use this file except in compliance with the License. You may obtain a copy
@@ -1,3 +1,3 @@
1
- export var version = '11.5.0';
1
+ export var version = '11.5.1';
2
2
  // Note: This file is automatically generated when building math.js.
3
3
  // Changes made in this file will be overwritten.