type DType = "i1" | "u1" | "i2" | "u2" | "i4" | "u4" | "i8" | "u8" | "f2" | "f4" | "f8" | "b1" | "c8" | "c16" | `U${number}`; type TypedArray = Int8Array | Int16Array | Int32Array | BigInt64Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | BigUint64Array | Float32Array | Float64Array; interface NpyArray { data: T; shape: number[]; dtype: DType; fortranOrder: boolean; } interface Options { /** Convert float16 to float32. Default true. */ convertFloat16?: boolean; } interface DumpOptions { /** * Specify the dtype for the output. Required for complex types (c8, c16) * since they cannot be inferred from a plain number array. */ dtype?: DType; } declare function load(source: string | ArrayBuffer | ArrayBufferView | Blob, opts?: Options): Promise; declare function float16ToFloat32(u16: number): number; declare function arrayToTypedArray(dtype: DType, array: ArrayLike): TypedArray; declare function inferDtypeFromArray(array: Array): DType; declare function dump(array: TypedArray | Array, shape?: number[], options?: DumpOptions): ArrayBuffer; declare class N { private opts; constructor(opts?: Options); load(source: string | ArrayBuffer | ArrayBufferView): Promise>>; static float16ToFloat32(u16: number): number; dump(array: TypedArray | Array, shape?: number[], options?: DumpOptions): ArrayBuffer; } export { type DType, type DumpOptions, type NpyArray, type Options, type TypedArray, arrayToTypedArray, N as default, dump, float16ToFloat32, inferDtypeFromArray, load };