Skip to content

Commit 51fcf70

Browse files
committed
fix export of ml-matrix package
1 parent 4af2e50 commit 51fcf70

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ require(['path/to/ml/dist/ml.min'], function (ML) {
5959
* Array Utils: [`ML.ArrayUtils`](https://github.com/mljs/array-utils)
6060
* Bit array operations: [`ML.BitArray`](https://github.com/mljs/bit-array)
6161
* Hash table: [`ML.HashTable`](https://github.com/mljs/hash-table)
62-
* Matrix: [`ML.Matrix`](https://github.com/mljs/matrix)
62+
* Matrix: [`ML.Matrix`](https://github.com/mljs/matrix) (Matrix class)
6363
* Pad array: [`ML.PadArray`](https://github.com/mljs/pad-array)
6464
* Regression: [`ML.Regression`](https://github.com/mljs/regression)
6565
* Binary search: [`ML.binarySearch`](https://github.com/darkskyapp/binary-search)
@@ -70,7 +70,7 @@ require(['path/to/ml/dist/ml.min'], function (ML) {
7070
* DistanceMatrix: [`ML.Math.DistanceMatrix`](https://github.com/mljs/distance-matrix)
7171
* Savitzky-Golay filter: [`ML.Math.SG`](https://github.com/mljs/savitzky-golay)
7272
* Savitzky-Golay generalized: [`ML.Math.SGG`](https://github.com/mljs/savitzky-golay-generalized)
73-
* Matrix: [`ML.Math.Matrix`](https://github.com/mljs/matrix) (alias of `ML.Matrix`)
73+
* Matrix: [`ML.Math.Matrix`](https://github.com/mljs/matrix) (All exports of the `ml-matrix` package)
7474
* Sparse matrix: [`ML.Math.SparseMatrix`](https://github.com/mljs/sparse-matrix)
7575
* Kernels: [`ML.Math.Kernel`](https://github.com/mljs/kernel)
7676
* Stat: [`ML.Stat`](https://github.com/mljs/stat)

src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
'use strict';
22

3+
const Matrix = require('ml-matrix');
4+
35
// Root packages
46
exports.ArrayUtils = exports.AU = require('ml-array-utils');
57
exports.BitArray = require('ml-bit-array');
68
exports.HashTable = require('ml-hash-table');
7-
exports.Matrix = require('ml-matrix').default;
9+
exports.Matrix = Matrix.default;
810
exports.PadArray = require('ml-pad-array');
911
exports.Regression = require('ml-regression');
1012
exports.binarySearch = require('binary-search');
@@ -20,7 +22,7 @@ Math.Similarity = distance.similarity;
2022
Math.DistanceMatrix = require('ml-distance-matrix');
2123
Math.SG = require('ml-savitzky-golay');
2224
Math.SGG = require('ml-savitzky-golay-generalized');
23-
Math.Matrix = exports.Matrix;
25+
Math.Matrix = Matrix;
2426
Math.SparseMatrix = require('ml-sparse-matrix');
2527
Math.Kernel = require('ml-kernel');
2628

0 commit comments

Comments
 (0)