Skip to content

Commit 0f1cdb9

Browse files
committed
Merge remote-tracking branch 'origin/main' into improve-performance-mmul
2 parents f2e2935 + 9361aa3 commit 0f1cdb9

23 files changed

+1532
-245
lines changed

.babelrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/documentationjs.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Node.js CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

99
jobs:
1010
nodejs:
1111
# Documentation: https://github.com/zakodium/workflows#nodejs-ci
1212
uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
1313
with:
14-
node-version-matrix: '[12, 14, 16]'
14+
lint-check-types: true

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
release:
@@ -14,4 +14,3 @@ jobs:
1414
secrets:
1515
github-token: ${{ secrets.BOT_TOKEN }}
1616
npm-token: ${{ secrets.NPM_BOT_TOKEN }}
17-

.github/workflows/typedoc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy TypeDoc on GitHub pages
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
env:
9+
NODE_VERSION: 22.x
10+
ENTRY_FILE: 'src/index.js'
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: ${{ env.NODE_VERSION }}
20+
- name: Install dependencies
21+
run: npm install
22+
- name: Build documentation
23+
uses: zakodium/typedoc-action@v2
24+
with:
25+
entry: ${{ env.ENTRY_FILE }}
26+
- name: Deploy to GitHub pages
27+
uses: JamesIves/github-pages-deploy-action@releases/v4
28+
with:
29+
token: ${{ secrets.BOT_TOKEN }}
30+
branch: gh-pages
31+
folder: docs
32+
clean: true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md

CHANGELOG.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## [3.0.1](https://github.com/mljs/sparse-matrix/compare/v3.0.0...v3.0.1) (2025-06-20)
4+
5+
6+
### Bug Fixes
7+
8+
* improve types by defining all methods and removing `eval` ([#15](https://github.com/mljs/sparse-matrix/issues/15)) ([a9a5894](https://github.com/mljs/sparse-matrix/commit/a9a5894bd8202723395933b3c89feb0263a41eb5))
9+
10+
## [3.0.0](https://github.com/mljs/sparse-matrix/compare/v2.1.0...v3.0.0) (2025-05-25)
11+
12+
13+
### ⚠ BREAKING CHANGES
14+
15+
* migrate to TypeScript and ESM
16+
17+
### Bug Fixes
18+
19+
* remove docs and build on gh-pages ([9197b3c](https://github.com/mljs/sparse-matrix/commit/9197b3c1eba1a9c2e2f894bdaa5b066563d047c9))
20+
* remove travis ([4ff4567](https://github.com/mljs/sparse-matrix/commit/4ff45677d1308976a52bc8f583f4772983a5a0f0))
21+
22+
23+
### Code Refactoring
24+
25+
* migrate to TypeScript and ESM ([d197546](https://github.com/mljs/sparse-matrix/commit/d19754622b6b96afe3699553bbea8e7e939ce899))
26+
327
## [2.1.0](https://github.com/mljs/sparse-matrix/compare/v2.0.0...v2.1.0) (2021-03-03)
428

529

@@ -49,6 +73,3 @@
4973

5074
<a name="0.1.0"></a>
5175
# 0.1.0 (2016-05-18)
52-
53-
54-

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sparse-matrix
1+
# ml-sparse-matrix
22

33
[![NPM version][npm-image]][npm-url]
44
[![coverage status][codecov-image]][codecov-url]
@@ -13,7 +13,7 @@ Sparse matrix library.
1313
## Usage
1414

1515
```js
16-
import { SparseMatrix } from "ml-sparse-matrix";
16+
import { SparseMatrix } from 'ml-sparse-matrix';
1717

1818
const matrix1 = new SparseMatrix([
1919
[1, 2],

benchmark/benchmark.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import { SparseMatrix } from '../src/index.js';
1+
import fs from 'node:fs';
2+
23
import { Matrix } from 'ml-matrix';
4+
5+
import { SparseMatrix } from '../src/index.js';
6+
37
import { SparseMatrix as SparseMatrixOld } from './class/SparseMatrixOld.js';
4-
import fs from 'fs';
58

69
function randomSparseMatrix(rows, cols, density = 0.01) {
710
const matrix = [];
@@ -176,15 +179,17 @@ function runSizeSweepBenchmark() {
176179
3,
177180
);
178181

179-
const denseAvg = benchmark(() => {
180-
denseA.mmul(denseB), 'denseMatrix', 3;
181-
});
182+
const denseAvg = benchmark(
183+
() => denseA.mmul(denseB),
184+
'denseMatrix',
185+
3,
186+
);
182187

183188
results.push({
184189
densityA,
185190
densityB,
186-
A_shape: [m, n],
187-
B_shape: [n, p],
191+
aShape: [m, n],
192+
bShape: [n, p],
188193
dense: denseAvg,
189194
mmulNew: mmulNewAvg,
190195
mmul: mmulAvg,

0 commit comments

Comments
 (0)