mathjs 11.5.1 → 11.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/HISTORY.md +34 -0
- package/lib/browser/math.js +1 -1
- package/lib/browser/math.js.LICENSE.txt +2 -2
- package/lib/browser/math.js.map +1 -1
- package/lib/cjs/entry/dependenciesAny/dependenciesAdd.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesAnd.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesAtan2.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesBitAnd.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesBitOr.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesBitXor.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesCompare.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesCompareText.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesDotDivide.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesDotMultiply.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesDotPow.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesEqual.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesFft.generated.js +10 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesGcd.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesLarger.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesLargerEq.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesLcm.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesLeftShift.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesMod.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesNthRoot.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesOr.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesRightArithShift.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesRightLogShift.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesSimplifyConstant.generated.js +0 -2
- package/lib/cjs/entry/dependenciesAny/dependenciesSmaller.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesSmallerEq.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesSubtract.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesTo.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesUnequal.generated.js +2 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesXor.generated.js +2 -0
- package/lib/cjs/entry/dependenciesNumber/dependenciesSimplifyConstant.generated.js +0 -2
- package/lib/cjs/entry/impureFunctionsAny.generated.js +102 -103
- package/lib/cjs/entry/impureFunctionsNumber.generated.js +41 -42
- package/lib/cjs/entry/pureFunctionsAny.generated.js +405 -372
- package/lib/cjs/expression/embeddedDocs/function/matrix/partitionSelect.js +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/sort.js +1 -1
- package/lib/cjs/function/algebra/simplifyConstant.js +1 -2
- package/lib/cjs/function/arithmetic/add.js +38 -37
- package/lib/cjs/function/arithmetic/dotDivide.js +5 -3
- package/lib/cjs/function/arithmetic/dotMultiply.js +5 -3
- package/lib/cjs/function/arithmetic/dotPow.js +5 -3
- package/lib/cjs/function/arithmetic/expm1.js +1 -1
- package/lib/cjs/function/arithmetic/gcd.js +40 -15
- package/lib/cjs/function/arithmetic/lcm.js +5 -3
- package/lib/cjs/function/arithmetic/mod.js +5 -3
- package/lib/cjs/function/arithmetic/nthRoot.js +5 -3
- package/lib/cjs/function/arithmetic/nthRoots.js +2 -1
- package/lib/cjs/function/arithmetic/round.js +1 -1
- package/lib/cjs/function/arithmetic/sign.js +1 -1
- package/lib/cjs/function/arithmetic/subtract.js +5 -3
- package/lib/cjs/function/bitwise/bitAnd.js +5 -3
- package/lib/cjs/function/bitwise/bitOr.js +5 -3
- package/lib/cjs/function/bitwise/bitXor.js +5 -3
- package/lib/cjs/function/bitwise/leftShift.js +5 -3
- package/lib/cjs/function/bitwise/rightArithShift.js +6 -4
- package/lib/cjs/function/bitwise/rightLogShift.js +5 -3
- package/lib/cjs/function/geometry/distance.js +3 -3
- package/lib/cjs/function/logical/and.js +5 -3
- package/lib/cjs/function/logical/or.js +5 -3
- package/lib/cjs/function/logical/xor.js +5 -3
- package/lib/cjs/function/matrix/column.js +3 -1
- package/lib/cjs/function/matrix/det.js +7 -1
- package/lib/cjs/function/matrix/diff.js +3 -3
- package/lib/cjs/function/matrix/fft.js +43 -4
- package/lib/cjs/function/matrix/getMatrixDataType.js +1 -1
- package/lib/cjs/function/matrix/partitionSelect.js +7 -2
- package/lib/cjs/function/matrix/row.js +3 -1
- package/lib/cjs/function/matrix/subset.js +1 -1
- package/lib/cjs/function/relational/compare.js +5 -3
- package/lib/cjs/function/relational/compareText.js +5 -3
- package/lib/cjs/function/relational/equal.js +5 -3
- package/lib/cjs/function/relational/larger.js +5 -3
- package/lib/cjs/function/relational/largerEq.js +5 -3
- package/lib/cjs/function/relational/smaller.js +5 -3
- package/lib/cjs/function/relational/smallerEq.js +5 -3
- package/lib/cjs/function/relational/unequal.js +5 -3
- package/lib/cjs/function/set/setIsSubset.js +1 -1
- package/lib/cjs/function/set/setSize.js +3 -2
- package/lib/cjs/function/statistics/max.js +1 -1
- package/lib/cjs/function/statistics/quantileSeq.js +4 -3
- package/lib/cjs/function/trigonometry/atan2.js +5 -3
- package/lib/cjs/function/unit/to.js +8 -6
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/type/matrix/utils/broadcast.js +84 -0
- package/lib/cjs/type/matrix/utils/matrixAlgorithmSuite.js +27 -20
- package/lib/cjs/version.js +1 -1
- package/lib/esm/entry/dependenciesAny/dependenciesAdd.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesAnd.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesAtan2.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesBitAnd.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesBitOr.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesBitXor.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesCompare.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesCompareText.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesDotDivide.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesDotMultiply.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesDotPow.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesEqual.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesFft.generated.js +10 -0
- package/lib/esm/entry/dependenciesAny/dependenciesGcd.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesLarger.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesLargerEq.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesLcm.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesLeftShift.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesMod.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesNthRoot.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesOr.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesRightArithShift.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesRightLogShift.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesSimplifyConstant.generated.js +0 -2
- package/lib/esm/entry/dependenciesAny/dependenciesSmaller.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesSmallerEq.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesSubtract.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesTo.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesUnequal.generated.js +2 -0
- package/lib/esm/entry/dependenciesAny/dependenciesXor.generated.js +2 -0
- package/lib/esm/entry/dependenciesNumber/dependenciesSimplifyConstant.generated.js +0 -2
- package/lib/esm/entry/impureFunctionsAny.generated.js +100 -101
- package/lib/esm/entry/impureFunctionsNumber.generated.js +38 -39
- package/lib/esm/entry/pureFunctionsAny.generated.js +332 -299
- package/lib/esm/expression/embeddedDocs/function/matrix/partitionSelect.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/sort.js +1 -1
- package/lib/esm/function/algebra/simplifyConstant.js +1 -2
- package/lib/esm/function/arithmetic/add.js +38 -37
- package/lib/esm/function/arithmetic/dotDivide.js +5 -3
- package/lib/esm/function/arithmetic/dotMultiply.js +5 -3
- package/lib/esm/function/arithmetic/dotPow.js +5 -3
- package/lib/esm/function/arithmetic/expm1.js +1 -1
- package/lib/esm/function/arithmetic/gcd.js +32 -13
- package/lib/esm/function/arithmetic/lcm.js +5 -3
- package/lib/esm/function/arithmetic/mod.js +5 -3
- package/lib/esm/function/arithmetic/nthRoot.js +5 -3
- package/lib/esm/function/arithmetic/nthRoots.js +2 -1
- package/lib/esm/function/arithmetic/round.js +1 -1
- package/lib/esm/function/arithmetic/sign.js +1 -1
- package/lib/esm/function/arithmetic/subtract.js +5 -3
- package/lib/esm/function/bitwise/bitAnd.js +5 -3
- package/lib/esm/function/bitwise/bitOr.js +5 -3
- package/lib/esm/function/bitwise/bitXor.js +5 -3
- package/lib/esm/function/bitwise/leftShift.js +5 -3
- package/lib/esm/function/bitwise/rightArithShift.js +6 -4
- package/lib/esm/function/bitwise/rightLogShift.js +5 -3
- package/lib/esm/function/geometry/distance.js +3 -3
- package/lib/esm/function/logical/and.js +5 -3
- package/lib/esm/function/logical/or.js +5 -3
- package/lib/esm/function/logical/xor.js +5 -3
- package/lib/esm/function/matrix/column.js +3 -1
- package/lib/esm/function/matrix/det.js +7 -1
- package/lib/esm/function/matrix/diff.js +3 -3
- package/lib/esm/function/matrix/fft.js +37 -4
- package/lib/esm/function/matrix/getMatrixDataType.js +1 -1
- package/lib/esm/function/matrix/partitionSelect.js +7 -2
- package/lib/esm/function/matrix/row.js +3 -1
- package/lib/esm/function/matrix/subset.js +1 -1
- package/lib/esm/function/relational/compare.js +5 -3
- package/lib/esm/function/relational/compareText.js +5 -3
- package/lib/esm/function/relational/equal.js +5 -3
- package/lib/esm/function/relational/larger.js +5 -3
- package/lib/esm/function/relational/largerEq.js +5 -3
- package/lib/esm/function/relational/smaller.js +5 -3
- package/lib/esm/function/relational/smallerEq.js +5 -3
- package/lib/esm/function/relational/unequal.js +5 -3
- package/lib/esm/function/set/setIsSubset.js +1 -1
- package/lib/esm/function/set/setSize.js +3 -2
- package/lib/esm/function/statistics/max.js +1 -1
- package/lib/esm/function/statistics/quantileSeq.js +4 -3
- package/lib/esm/function/trigonometry/atan2.js +5 -3
- package/lib/esm/function/unit/to.js +8 -6
- package/lib/esm/type/matrix/utils/broadcast.js +75 -0
- package/lib/esm/type/matrix/utils/matrixAlgorithmSuite.js +25 -20
- package/lib/esm/version.js +1 -1
- package/package.json +14 -14
- package/types/index.d.ts +247 -471
@@ -0,0 +1,75 @@
|
|
1
|
+
import { factory } from '../../../utils/factory.js';
|
2
|
+
var name = 'broadcast';
|
3
|
+
var dependancies = ['concat'];
|
4
|
+
export var createBroadcast = /* #__PURE__ */factory(name, dependancies, _ref => {
|
5
|
+
var {
|
6
|
+
concat
|
7
|
+
} = _ref;
|
8
|
+
/**
|
9
|
+
* Broadcasts two matrices, and return both in an array
|
10
|
+
* It checks if it's possible with broadcasting rules
|
11
|
+
*
|
12
|
+
* @param {Matrix} A First Matrix
|
13
|
+
* @param {Matrix} B Second Matrix
|
14
|
+
*
|
15
|
+
* @return {Matrix[]} [ broadcastedA, broadcastedB ]
|
16
|
+
*/
|
17
|
+
return function (A, B) {
|
18
|
+
var N = Math.max(A._size.length, B._size.length); // max number of dims
|
19
|
+
if (A._size.length === B._size.length) {
|
20
|
+
if (A._size.every((dim, i) => dim === B._size[i])) {
|
21
|
+
// If matrices have the same size return them
|
22
|
+
return [A, B];
|
23
|
+
}
|
24
|
+
}
|
25
|
+
var sizeA = _padLeft(A._size, N, 0); // pad to the left to align dimensions to the right
|
26
|
+
var sizeB = _padLeft(B._size, N, 0); // pad to the left to align dimensions to the right
|
27
|
+
|
28
|
+
// calculate the max dimensions
|
29
|
+
var sizeMax = [];
|
30
|
+
for (var dim = 0; dim < N; dim++) {
|
31
|
+
sizeMax[dim] = Math.max(sizeA[dim], sizeB[dim]);
|
32
|
+
}
|
33
|
+
|
34
|
+
// check if the broadcasting rules applyes for both matrices
|
35
|
+
for (var _dim = 0; _dim < N; _dim++) {
|
36
|
+
_checkRules(sizeA, sizeMax, _dim);
|
37
|
+
_checkRules(sizeB, sizeMax, _dim);
|
38
|
+
}
|
39
|
+
|
40
|
+
// reshape A or B if needed to make them ready for concat
|
41
|
+
var AA = A.clone();
|
42
|
+
var BB = B.clone();
|
43
|
+
if (AA._size.length < N) {
|
44
|
+
AA.reshape(_padLeft(AA._size, N, 1));
|
45
|
+
} else if (BB._size.length < N) {
|
46
|
+
BB.reshape(_padLeft(BB._size, N, 1));
|
47
|
+
}
|
48
|
+
|
49
|
+
// stretches the matrices on each dimension to make them the same size
|
50
|
+
for (var _dim2 = 0; _dim2 < N; _dim2++) {
|
51
|
+
if (AA._size[_dim2] < sizeMax[_dim2]) {
|
52
|
+
AA = _stretch(AA, sizeMax[_dim2], _dim2);
|
53
|
+
}
|
54
|
+
if (BB._size[_dim2] < sizeMax[_dim2]) {
|
55
|
+
BB = _stretch(BB, sizeMax[_dim2], _dim2);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
// return the array with the two broadcasted matrices
|
60
|
+
return [AA, BB];
|
61
|
+
};
|
62
|
+
function _padLeft(shape, N, filler) {
|
63
|
+
// pads an array of dimensions with numbers to the left, unitl the number of dimensions is N
|
64
|
+
return [...Array(N - shape.length).fill(filler), ...shape];
|
65
|
+
}
|
66
|
+
function _stretch(arrayToStretch, sizeToStretch, dimToStretch) {
|
67
|
+
// stretches a matrix up to a certain size in a certain dimension
|
68
|
+
return concat(...Array(sizeToStretch).fill(arrayToStretch), dimToStretch);
|
69
|
+
}
|
70
|
+
function _checkRules(shape, sizeMax, dim) {
|
71
|
+
if (shape[dim] < sizeMax[dim] & shape[dim] > 1) {
|
72
|
+
throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(shape, ") not possible to broadcast dimension ").concat(dim, " with size ").concat(shape[dim], " to size ").concat(sizeMax[dim]));
|
73
|
+
}
|
74
|
+
}
|
75
|
+
});
|
@@ -2,12 +2,14 @@ import { factory } from '../../../utils/factory.js';
|
|
2
2
|
import { extend } from '../../../utils/object.js';
|
3
3
|
import { createMatAlgo13xDD } from './matAlgo13xDD.js';
|
4
4
|
import { createMatAlgo14xDs } from './matAlgo14xDs.js';
|
5
|
+
import { createBroadcast } from './broadcast.js';
|
5
6
|
var name = 'matrixAlgorithmSuite';
|
6
|
-
var dependencies = ['typed', 'matrix'];
|
7
|
+
var dependencies = ['typed', 'matrix', 'concat'];
|
7
8
|
export var createMatrixAlgorithmSuite = /* #__PURE__ */factory(name, dependencies, _ref => {
|
8
9
|
var {
|
9
10
|
typed,
|
10
|
-
matrix
|
11
|
+
matrix,
|
12
|
+
concat
|
11
13
|
} = _ref;
|
12
14
|
var matAlgo13xDD = createMatAlgo13xDD({
|
13
15
|
typed
|
@@ -15,6 +17,9 @@ export var createMatrixAlgorithmSuite = /* #__PURE__ */factory(name, dependencie
|
|
15
17
|
var matAlgo14xDs = createMatAlgo14xDs({
|
16
18
|
typed
|
17
19
|
});
|
20
|
+
var broadcast = createBroadcast({
|
21
|
+
concat
|
22
|
+
});
|
18
23
|
|
19
24
|
/**
|
20
25
|
* Return a signatures object with the usual boilerplate of
|
@@ -40,60 +45,60 @@ export var createMatrixAlgorithmSuite = /* #__PURE__ */factory(name, dependencie
|
|
40
45
|
if (elop) {
|
41
46
|
// First the dense ones
|
42
47
|
matrixSignatures = {
|
43
|
-
'DenseMatrix, DenseMatrix': (x, y) => matAlgo13xDD(x, y, elop),
|
44
|
-
'Array, Array': (x, y) => matAlgo13xDD(matrix(x), matrix(y), elop).valueOf(),
|
45
|
-
'Array, DenseMatrix': (x, y) => matAlgo13xDD(matrix(x), y, elop),
|
46
|
-
'DenseMatrix, Array': (x, y) => matAlgo13xDD(x, matrix(y), elop)
|
48
|
+
'DenseMatrix, DenseMatrix': (x, y) => matAlgo13xDD(...broadcast(x, y), elop),
|
49
|
+
'Array, Array': (x, y) => matAlgo13xDD(...broadcast(matrix(x), matrix(y)), elop).valueOf(),
|
50
|
+
'Array, DenseMatrix': (x, y) => matAlgo13xDD(...broadcast(matrix(x), y), elop),
|
51
|
+
'DenseMatrix, Array': (x, y) => matAlgo13xDD(...broadcast(x, matrix(y)), elop)
|
47
52
|
};
|
48
53
|
// Now incorporate sparse matrices
|
49
54
|
if (options.SS) {
|
50
|
-
matrixSignatures['SparseMatrix, SparseMatrix'] = (x, y) => options.SS(x, y, elop, false);
|
55
|
+
matrixSignatures['SparseMatrix, SparseMatrix'] = (x, y) => options.SS(...broadcast(x, y), elop, false);
|
51
56
|
}
|
52
57
|
if (options.DS) {
|
53
|
-
matrixSignatures['DenseMatrix, SparseMatrix'] = (x, y) => options.DS(x, y, elop, false);
|
54
|
-
matrixSignatures['Array, SparseMatrix'] = (x, y) => options.DS(matrix(x), y, elop, false);
|
58
|
+
matrixSignatures['DenseMatrix, SparseMatrix'] = (x, y) => options.DS(...broadcast(x, y), elop, false);
|
59
|
+
matrixSignatures['Array, SparseMatrix'] = (x, y) => options.DS(...broadcast(matrix(x), y), elop, false);
|
55
60
|
}
|
56
61
|
if (SD) {
|
57
|
-
matrixSignatures['SparseMatrix, DenseMatrix'] = (x, y) => SD(y, x, elop, true);
|
58
|
-
matrixSignatures['SparseMatrix, Array'] = (x, y) => SD(matrix(y), x, elop, true);
|
62
|
+
matrixSignatures['SparseMatrix, DenseMatrix'] = (x, y) => SD(...broadcast(y, x), elop, true);
|
63
|
+
matrixSignatures['SparseMatrix, Array'] = (x, y) => SD(...broadcast(matrix(y), x), elop, true);
|
59
64
|
}
|
60
65
|
} else {
|
61
66
|
// No elop, use this
|
62
67
|
// First the dense ones
|
63
68
|
matrixSignatures = {
|
64
69
|
'DenseMatrix, DenseMatrix': typed.referToSelf(self => (x, y) => {
|
65
|
-
return matAlgo13xDD(x, y, self);
|
70
|
+
return matAlgo13xDD(...broadcast(x, y), self);
|
66
71
|
}),
|
67
72
|
'Array, Array': typed.referToSelf(self => (x, y) => {
|
68
|
-
return matAlgo13xDD(matrix(x), matrix(y), self).valueOf();
|
73
|
+
return matAlgo13xDD(...broadcast(matrix(x), matrix(y)), self).valueOf();
|
69
74
|
}),
|
70
75
|
'Array, DenseMatrix': typed.referToSelf(self => (x, y) => {
|
71
|
-
return matAlgo13xDD(matrix(x), y, self);
|
76
|
+
return matAlgo13xDD(...broadcast(matrix(x), y), self);
|
72
77
|
}),
|
73
78
|
'DenseMatrix, Array': typed.referToSelf(self => (x, y) => {
|
74
|
-
return matAlgo13xDD(x, matrix(y), self);
|
79
|
+
return matAlgo13xDD(...broadcast(x, matrix(y)), self);
|
75
80
|
})
|
76
81
|
};
|
77
82
|
// Now incorporate sparse matrices
|
78
83
|
if (options.SS) {
|
79
84
|
matrixSignatures['SparseMatrix, SparseMatrix'] = typed.referToSelf(self => (x, y) => {
|
80
|
-
return options.SS(x, y, self, false);
|
85
|
+
return options.SS(...broadcast(x, y), self, false);
|
81
86
|
});
|
82
87
|
}
|
83
88
|
if (options.DS) {
|
84
89
|
matrixSignatures['DenseMatrix, SparseMatrix'] = typed.referToSelf(self => (x, y) => {
|
85
|
-
return options.DS(x, y, self, false);
|
90
|
+
return options.DS(...broadcast(x, y), self, false);
|
86
91
|
});
|
87
92
|
matrixSignatures['Array, SparseMatrix'] = typed.referToSelf(self => (x, y) => {
|
88
|
-
return options.DS(matrix(x), y, self, false);
|
93
|
+
return options.DS(...broadcast(matrix(x), y), self, false);
|
89
94
|
});
|
90
95
|
}
|
91
96
|
if (SD) {
|
92
97
|
matrixSignatures['SparseMatrix, DenseMatrix'] = typed.referToSelf(self => (x, y) => {
|
93
|
-
return SD(y, x, self, true);
|
98
|
+
return SD(...broadcast(y, x), self, true);
|
94
99
|
});
|
95
100
|
matrixSignatures['SparseMatrix, Array'] = typed.referToSelf(self => (x, y) => {
|
96
|
-
return SD(matrix(y), x, self, true);
|
101
|
+
return SD(...broadcast(matrix(y), x), self, true);
|
97
102
|
});
|
98
103
|
}
|
99
104
|
}
|
package/lib/esm/version.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mathjs",
|
3
|
-
"version": "11.
|
3
|
+
"version": "11.7.0",
|
4
4
|
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.",
|
5
5
|
"author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
|
6
6
|
"homepage": "https://mathjs.org",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"unit"
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
|
-
"@babel/runtime": "^7.
|
28
|
+
"@babel/runtime": "^7.21.0",
|
29
29
|
"complex.js": "^2.1.1",
|
30
30
|
"decimal.js": "^10.4.3",
|
31
31
|
"escape-latex": "^1.2.0",
|
@@ -36,25 +36,25 @@
|
|
36
36
|
"typed-function": "^4.1.0"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@babel/core": "7.
|
39
|
+
"@babel/core": "7.21.3",
|
40
40
|
"@babel/plugin-transform-object-assign": "7.18.6",
|
41
|
-
"@babel/plugin-transform-runtime": "7.
|
41
|
+
"@babel/plugin-transform-runtime": "7.21.0",
|
42
42
|
"@babel/preset-env": "7.20.2",
|
43
|
-
"@babel/register": "7.
|
43
|
+
"@babel/register": "7.21.0",
|
44
44
|
"@types/assert": "1.5.6",
|
45
45
|
"@types/mocha": "10.0.1",
|
46
|
-
"@typescript-eslint/eslint-plugin": "5.
|
47
|
-
"@typescript-eslint/parser": "5.
|
46
|
+
"@typescript-eslint/eslint-plugin": "5.55.0",
|
47
|
+
"@typescript-eslint/parser": "5.55.0",
|
48
48
|
"assert": "2.0.0",
|
49
49
|
"babel-loader": "9.1.2",
|
50
50
|
"benchmark": "2.1.4",
|
51
|
-
"c8": "7.
|
51
|
+
"c8": "7.13.0",
|
52
52
|
"codecov": "3.8.3",
|
53
|
-
"core-js": "3.
|
53
|
+
"core-js": "3.29.1",
|
54
54
|
"del": "6.1.1",
|
55
55
|
"dtslint": "4.2.1",
|
56
|
-
"eslint": "8.
|
57
|
-
"eslint-config-prettier": "8.
|
56
|
+
"eslint": "8.36.0",
|
57
|
+
"eslint-config-prettier": "8.7.0",
|
58
58
|
"eslint-config-standard": "17.0.0",
|
59
59
|
"eslint-plugin-import": "2.27.5",
|
60
60
|
"eslint-plugin-mocha": "10.1.0",
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"karma-mocha": "2.0.1",
|
76
76
|
"karma-mocha-reporter": "2.2.5",
|
77
77
|
"karma-webpack": "5.0.0",
|
78
|
-
"mkdirp": "2.1.
|
78
|
+
"mkdirp": "2.1.5",
|
79
79
|
"mocha": "10.2.0",
|
80
80
|
"mocha-junit-reporter": "2.2.0",
|
81
81
|
"ndarray": "1.0.19",
|
@@ -85,12 +85,12 @@
|
|
85
85
|
"ndarray-pack": "1.2.1",
|
86
86
|
"numericjs": "1.2.6",
|
87
87
|
"pad-right": "0.2.2",
|
88
|
-
"prettier": "2.8.
|
88
|
+
"prettier": "2.8.4",
|
89
89
|
"process": "0.11.10",
|
90
90
|
"sylvester": "0.0.21",
|
91
91
|
"ts-node": "10.9.1",
|
92
92
|
"typescript": "4.9.5",
|
93
|
-
"webpack": "5.
|
93
|
+
"webpack": "5.76.1",
|
94
94
|
"zeros": "1.0.0"
|
95
95
|
},
|
96
96
|
"type": "module",
|