-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathndarray.d.ts
More file actions
30 lines (27 loc) · 961 Bytes
/
ndarray.d.ts
File metadata and controls
30 lines (27 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
declare function ndarray(data: ndarray.Data, shape?: number[], stride?: number[], offset?: number): ndarray.NdArray;
declare namespace ndarray {
type Data =
Array<number> | Int8Array | Int16Array | Int32Array |
Uint8Array | Uint16Array | Uint32Array |
Float32Array | Float64Array | Uint8ClampedArray;
interface NdArray {
data: Data;
shape: number[];
stride: number[];
offset: number;
dtype: 'int8' | 'int16' | 'int32' | 'uint8' | 'uint16' |'uint32' |
'float32' | 'float64' | 'array'| 'uint8_clamped' | 'buffer' | 'generic';
size: number;
order: number[];
dimension: number;
get(...args: number[]): number;
set(...args: number[]): number;
index(...args: number[]): number;
lo(...args: number[]): NdArray;
hi(...args: number[]): NdArray;
step(...args: number[]): NdArray;
transpose(...args: number[]): NdArray;
pick(...args: number[]): NdArray;
}
}
export = ndarray;