diff --git a/package.json b/package.json index 5ab6bd5..5a468b7 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "vitest": "^2.1.3" }, "dependencies": { - "cheminfo-types": "^1.8.0", "ml-matrix": "^6.12.0", "ml-regression-base": "^4.0.0" } diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index d1f2f53..5fc7e9f 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -1,8 +1,7 @@ -import { NumberArray } from 'cheminfo-types'; import { createRandomArray, xSum } from 'ml-spectra-processing'; import { expect, it, describe } from 'vitest'; -import { PolynomialRegression } from '..'; +import { PolynomialRegression, type NumberArray } from '..'; function assertCoefficientsAndPowers( result: PolynomialRegression, diff --git a/src/index.ts b/src/index.ts index c3b22e6..b8ae977 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -import { type NumberArray } from 'cheminfo-types'; import { Matrix, MatrixTransposeView, solve } from 'ml-matrix'; import { BaseRegression, @@ -6,6 +5,18 @@ import { maybeToPrecision, } from 'ml-regression-base'; +export type NumberArray = + | number[] + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array; + interface PolynomialRegressionOptions { interceptAtZero?: boolean; }