import { Float32Buffer, Float64Buffer } from '@rapidsai/cuda'; import { MemoryResource } from '@rapidsai/rmm'; import { Series } from '../series'; import { Float32, Float64, FloatingPoint } from '../types/dtypes'; import { NumericSeries } from './numeric'; import { StringSeries } from './string'; /** * A base class for Series of 32 or 64-bit floating-point values in GPU memory. */ export declare abstract class FloatSeries extends NumericSeries { _castAsString(memoryResource?: MemoryResource): StringSeries; /** * Creates a Series of `BOOL8` elements where `true` indicates the value is `NaN` and `false` * indicates the value is valid. * * @param memoryResource Memory resource used to allocate the result Column's device memory. * @returns A non-nullable Series of `BOOL8` elements with `true` representing `NaN` values. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * * // Float64Series * Series.new([1, NaN, 3]).isNaN() // [false, true, false] * ``` */ isNaN(memoryResource?: MemoryResource): import("./bool").Bool8Series; /** * Creates a Series of `BOOL8` elements indicating the absence of `NaN` values in a * column of floating point values. The output element at row `i` is `false` if the element in * `input` at row i is `NaN`, else `true` * * @param memoryResource Memory resource used to allocate the result Series's device memory. * @returns A non-nullable Series of `BOOL8` elements with `true` representing `NAN` * values */ isNotNaN(memoryResource?: MemoryResource): import("./bool").Bool8Series; /** * Round each floating-point value in this Series to the nearest integer. * * @param memoryResource Memory resource used to allocate the result Series's device memory. * @returns A Series of the same number of elements containing the result of the operation. */ rint(memoryResource?: MemoryResource): Series; protected _process_reduction(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * convert NaN values in the series with Null values, * while also updating the nullMask and nullCount values * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. * @returns updated Series with Null values */ nansToNulls(memoryResource?: MemoryResource): Series; /** * drop NaN values from the column if column is of floating-type * values and contains NA values * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. * @returns column without NaN values */ dropNaNs(memoryResource?: MemoryResource): Series; /** * Replace NaN values with a scalar value. * * @param value The value to use in place of NaNs. * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. */ replaceNaNs(value: T['scalarType'], memoryResource?: MemoryResource): Series; /** * Replace NaN values with the corresponding elements from another Series. * * @param value The Series to use in place of NaNs. * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. */ replaceNaNs(value: Series, memoryResource?: MemoryResource): Series; /** * Return whether all elements are true in Series. * * @param skipNulls bool * Exclude NA/null values. If the entire row/column is NA and skipNulls is true, then the result * will be true, as for an empty row/column. If skipNulls is false, then NA are treated as true, * because these are not equal to zero. * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. * * @returns true if all elements are true in Series, else false. */ all(skipNulls?: boolean, memoryResource?: MemoryResource): boolean; /** * Return whether any elements are true in Series. * * @param skipNulls bool * Exclude NA/null values. If the entire row/column is NA and skipNulls is true, then the result * will be true, as for an empty row/column. If skipNulls is false, then NA are treated as true, * because these are not equal to zero. * @param memoryResource The optional MemoryResource used to allocate the result Column's device * memory. * * @returns true if any elements are true in Series, else false. */ any(skipNulls?: boolean, memoryResource?: MemoryResource): boolean; /** * Compute the cumulative max of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative max of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]) * * a.cumulativeMax() // {4, 4, 5, 5, 5} * ``` */ cumulativeMax(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative min of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative min of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]) * * a.cumulativeMin() // {4, 2, 2, 1, 1} * ``` */ cumulativeMin(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative product of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative product of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]) * * a.cumulativeProduct() // {4, 8, 40, 40, 40} * ``` */ cumulativeProduct(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative sum of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative sum of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]) * * a.cumulativeSum() // {4, 6, 11, 12, 13} * ``` */ cumulativeSum(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the mean of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The mean of all the values in this Series. */ mean(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** * Compute the median of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The median of all the values in this Series. */ median(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** * Compute the nunique of all values in this Series. * * @param dropna * If true, NA/null values will not contribute to the count of unique values. If false, they * will be included in the count. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The number of unqiue values in this Series. */ nunique(dropna?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; /** @inheritdoc */ sum(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ product(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ sumOfSquares(skipNulls?: boolean, memoryResource?: MemoryResource): number; } /** * A Series of 32-bit floating-point values in GPU memory. */ export declare class Float32Series extends FloatSeries { /** * A Float32 view of the values in GPU memory. */ get data(): Float32Buffer; } /** * A Series of 64-bit floating-point values in GPU memory. */ export declare class Float64Series extends FloatSeries { /** * A Float64 view of the values in GPU memory. */ get data(): Float64Buffer; } //# sourceMappingURL=float.d.ts.map