in include/quantile_conditional.hpp [84:98]
void add_vector_update(nb::class_<SK>& clazz) {
clazz.def(
"update",
[](SK& sk, nb::ndarray<T> items) {
if (items.ndim() != 1) {
throw std::invalid_argument("input data must have only one dimension. Found: "
+ std::to_string(items.ndim()));
}
auto v = items.template view<T, nb::ndim<1>>();
for (uint32_t i = 0; i < v.shape(0); ++i) sk.update(v(i));
},
nb::arg("array"),
"Updates the sketch with the values in the given array"
);
}