import { type ConstType, WeakValueMap } from './helpers/helpers.ts'; import { type FmtStr } from './helpers/memoryview.ts'; export type { FmtStr } from './helpers/memoryview.ts'; export type { ConstType } from './helpers/helpers.ts'; export declare const bitcast: (data: (number | bigint | boolean)[], srcFmt: FmtStr, destFmt: FmtStr) => any[]; export declare class DType { priority: number; itemsize: number; name: string; fmt: undefined | FmtStr; count: number; _scalar?: DType | undefined; _id: bigint; static cache: WeakValueMap; constructor(priority: number, itemsize: number, name: string, fmt: undefined | FmtStr, count: number, _scalar?: DType | undefined, kwargs?: any[]); static new: (priority: number, itemsize: number, name: string, fmt?: FmtStr) => DType; toString: () => string; lt: (o: DType) => boolean; get base(): DType; get vcount(): number; vec: (sz: number) => DType; ptr: (size?: number, local?: boolean) => PtrDType; scalar: () => DType; } export declare class PtrDType extends DType { _base: DType; local: boolean; v: number; size: number; constructor(priority: number, itemsize: number, name: string, fmt: undefined | FmtStr, count: number, _scalar: undefined | DType, _base: DType, local: boolean, v: number, size?: number, kwargs?: any[]); get base(): DType; vec: (sz: number) => DType; ptr: (size?: number, local?: boolean) => PtrDType; get vcount(): number; toString: () => string; } export declare class ImageDType extends PtrDType { shape: number[]; constructor(priority: number, itemsize: number, name: string, fmt: undefined | FmtStr, count: number, _scalar: undefined | DType, _base: DType, local: boolean, v: number, size: number | undefined, shape: number[]); ptr: (size?: number, local?: boolean) => ImageDType; vec: (sz: number) => DType; toString: () => string; } export declare class dtypes { static is_float: (x: DType) => boolean; static is_int: (x: DType) => boolean; static is_big_int: (x: DType) => boolean; static is_unsigned: (x: DType) => boolean; static from_js: (x: number | boolean | bigint | (number | bigint | boolean)[]) => DType; static verify: (val: ConstType, dtype: DType) => boolean; static as_const(val: ConstType | ConstType[], dtype: DType): ConstType | ConstType[]; static min: (dtype: DType) => ConstType; static max: (dtype: DType) => ConstType; /** * @returns [exponent, mantissa] */ static finfo(x: DType): [number, number]; static fields: () => Record; static void: DType; static bool: DType; static int8: DType; static uint8: DType; static int16: DType; static uint16: DType; static int32: DType; static uint32: DType; static int64: DType; static uint64: DType; static float16: DType; static bfloat16: DType; static float32: DType; static float64: DType; static half: DType; static float: DType; static double: DType; static uchar: DType; static ushort: DType; static uint: DType; static ulong: DType; static char: DType; static short: DType; static int: DType; static long: DType; static imageh: (...shp: number[]) => ImageDType; static imagef: (...shp: number[]) => ImageDType; static default_float: DType; static default_int: DType; static floats: DType[]; static uints: DType[]; static sints: DType[]; static ints: DType[]; static bigints: DType[]; } export type DTypeLike = string | DType; export declare const to_dtype: (x: DTypeLike) => DType; export declare const promoLattice: Map; export declare const _get_recursive_parents: (dtype: DType) => DType[]; export declare const least_upper_dtype: (...args: DType[]) => DType; export declare const least_upper_float: (dt: DType) => DType; export declare const DTYPES_DICT: Record; export declare const INVERSE_DTYPES_DICT: Record; export declare const sum_acc_dtype: (dt: DType) => DType; export declare const truncate: Map any>;