You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by jm...@apache.org on 2022/04/06 23:04:34 UTC
[datasketches-cpp] branch quantiles updated: add missing cassert include -- should probably ultimately remove asserts instead
This is an automated email from the ASF dual-hosted git repository.
jmalkin pushed a commit to branch quantiles
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
The following commit(s) were added to refs/heads/quantiles by this push:
new 0e2883e add missing cassert include -- should probably ultimately remove asserts instead
0e2883e is described below
commit 0e2883e06ddfab73e6a50cfc55743f1eff71bc02
Author: Jon Malkin <jm...@users.noreply.github.com>
AuthorDate: Wed Apr 6 16:04:25 2022 -0700
add missing cassert include -- should probably ultimately remove asserts instead
---
python/src/quantiles_wrapper.cpp | 4 ++--
quantiles/include/quantiles_sketch_impl.hpp | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/python/src/quantiles_wrapper.cpp b/python/src/quantiles_wrapper.cpp
index 3e79756..7cac6d7 100644
--- a/python/src/quantiles_wrapper.cpp
+++ b/python/src/quantiles_wrapper.cpp
@@ -75,8 +75,8 @@ py::list quantiles_sketch_get_quantiles(const quantiles_sketch<T>& sk,
bool inclusive) {
size_t n_quantiles = fractions.size();
auto result = inclusive
- ? sk.template get_quantiles<true>(&fractions[0], n_quantiles)
- : sk.template get_quantiles<false>(&fractions[0], n_quantiles);
+ ? sk.template get_quantiles<true>(&fractions[0], static_cast<uint32_t>(n_quantiles))
+ : sk.template get_quantiles<false>(&fractions[0], static_cast<uint32_t>(n_quantiles));
// returning as std::vector<> would copy values to a list anyway
py::list list(n_quantiles);
diff --git a/quantiles/include/quantiles_sketch_impl.hpp b/quantiles/include/quantiles_sketch_impl.hpp
index 81bf85a..0e63efc 100644
--- a/quantiles/include/quantiles_sketch_impl.hpp
+++ b/quantiles/include/quantiles_sketch_impl.hpp
@@ -20,6 +20,7 @@
#ifndef _QUANTILES_SKETCH_IMPL_HPP_
#define _QUANTILES_SKETCH_IMPL_HPP_
+#include <cassert>
#include <cmath>
#include <algorithm>
#include <stdexcept>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org