/** * Elementwise equality comparison of two arrays, treating NaNs as equal. * If `precision` is provided, numeric comparison uses a tolerance of 10^-precision. * @param source1 First input array * @param source2 Second input array * @param precision Optional decimal precision for fuzzy equality * @returns `true` if arrays are equal, `false` otherwise */ declare function equals(source1: ArrayLike, source2: ArrayLike, precision?: number): boolean; /** * Return true if all elements are NaN. * @param source Input array * @returns `true` when every entry is NaN */ declare function allna(source: ArrayLike): boolean; /** * Count NaN entries in `source`. * @param source Input array * @returns Number of NaNs in the array */ declare function countna(source: ArrayLike): number; /** * Test whether any of the provided arrays contains a NaN at the same index. * Performs a single-pass scan across arrays and exits early on the first NaN. * @param sources One or more input arrays * @returns `true` if any NaN is found, otherwise `false` */ declare function havena(...sources: ArrayLike[]): boolean; /** * Return a mask indicating NaN positions: 1 for NaN, 0 otherwise. * @param source Input array * @returns Float64Array mask of 0/1 values */ declare function isna(source: ArrayLike): Float64Array; /** * Inverse of `isna`: mask with 1 for valid numbers and 0 for NaNs. * @param source Input array * @returns Float64Array mask of 0/1 values */ declare function notna(source: ArrayLike): Float64Array; /** * Replace NaNs with `value`. When `inplace=true` and `source` is a Float64Array, * the original buffer is mutated. * @param source Input array * @param value Replacement value for NaNs * @param inplace Whether to mutate the input when possible * @returns Float64Array with NaNs replaced */ declare function fillna(source: ArrayLike, value: number, inplace?: boolean): Float64Array; /** * Forward-fill NaNs: propagate the last valid value forward. Leading NaNs remain NaN. * @param source Input array * @param inplace Whether to mutate the input when possible * @returns Float64Array with forward-filled values */ declare function ffill(source: ArrayLike, inplace?: boolean): Float64Array; /** * Backward-fill NaNs: propagate the next valid value backward. Trailing NaNs remain NaN. * @param source Input array * @param inplace Whether to mutate the input when possible * @returns Float64Array with backward-filled values */ declare function bfill(source: ArrayLike, inplace?: boolean): Float64Array; export declare function lag(source: ArrayLike, shift?: number): Float64Array; /** * Replace occurrences of `fromValue` with `toValue`. If `fromValue` is NaN, * NaN entries are replaced. * @param source Input array * @param fromValue Value to replace (may be NaN) * @param toValue Replacement value * @param inplace Whether to mutate the input when possible * @returns Float64Array with replacements applied */ declare function replace(source: ArrayLike, fromValue: number, toValue: number, inplace?: boolean): Float64Array; /** * Remove NaN entries from `source` and return a compacted Float64Array. * @param source Input array * @returns New Float64Array containing only the non-NaN values */ declare function dropna(source: ArrayLike): Float64Array; export { isna, notna, fillna, ffill, bfill, replace, dropna, allna, equals, countna, havena };