Skip to main content

nd_arrow_array/compute/
mod.rs

1//! Compute kernels for [`NdArrowArray`](crate::NdArrowArray), with NumPy and xarray semantics.
2//!
3//! Axes are addressed by dimension name. Broadcasting aligns axes by name.
4//! Missing values are Arrow nulls: kernels skip nulls like the NumPy `nan*`
5//! functions.
6//!
7//! Attribute rules follow xarray defaults:
8//! - layout kernels, `cast`, `where_`, `fill_null` and `clip` keep the attributes;
9//! - arithmetic, comparisons, math functions and reductions drop them;
10//! - [`decode_cf`] and [`encode_cf`] move the CF encoding keys.
11
12pub(crate) mod layout;
13
14/// Minimum output length for parallel execution with the `parallel` feature.
15#[cfg(feature = "parallel")]
16pub(crate) const PARALLEL_MIN_LEN: usize = 1 << 20;
17
18mod batch;
19mod methods;
20mod ops;
21
22pub mod aggregate;
23pub mod cf;
24pub mod column;
25pub mod elementwise;
26pub mod groupby;
27pub mod histogram;
28pub mod interp;
29pub mod partial;
30pub mod reduce;
31pub mod resample;
32pub mod search;
33pub mod shape;
34pub mod time;
35pub mod window;
36
37pub use aggregate::{CoarsenBoundary, coarsen, dot, weighted_mean, weighted_sum};
38pub use cf::{CfEncoding, decode_cf, encode_cf};
39pub use column::{
40    column_binary, column_cast, column_decode_cf, column_unary, row_reduce, row_reduce_axes,
41};
42pub use elementwise::*;
43pub use groupby::groupby_reduce;
44pub use histogram::{bincount, histogram};
45pub use interp::{InterpMethod, interp, interp_with};
46pub use partial::{PartialReduction, merge_all};
47pub use reduce::*;
48pub use resample::{Frequency, resample};
49pub use search::{SearchSide, argsort, argwhere, digitize, isin, searchsorted, sort, unique};
50pub use shape::*;
51pub use time::{
52    CfTimeUnits, DatePart, TimePeriod, decode_cf_time, encode_cf_time, floor_time, time_component,
53};
54pub use window::{RollingOp, rolling};