/** * Pure-JS parser for NumPy .npy files. * * We avoid pulling in any numpy / pyodide dependency — the .npy spec is small * and stable enough that a hand-written reader is the most predictable choice * for a browser preview surface. * * Spec ref: https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html */ export type TypedArrayCtor = Float32ArrayConstructor | Float64ArrayConstructor | Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor; export interface NpyHeader { descr: string; fortranOrder: boolean; shape: number[]; dataOffset: number; itemSize: number; typedArrayCtor: TypedArrayCtor | null; isLittleEndian: boolean; } export declare class NpyParseError extends Error { constructor(message: string); } export declare function npyDtypeMap(descr: string): { itemSize: number; typedArrayCtor: TypedArrayCtor | null; isLittleEndian: boolean; humanLabel: string; }; export declare function parseNpyHeader(buf: ArrayBuffer): NpyHeader; export declare function decodeNpyData(buf: ArrayBuffer, header: NpyHeader, maxElements: number): { values: number[] | bigint[]; total: number; truncated: boolean; }; //# sourceMappingURL=npy-parse.d.ts.map