This is an automated email from the ASF dual-hosted git repository.
jmalkin pushed a commit to branch python_vector_kll
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git
The following commit(s) were added to refs/heads/python_vector_kll by this push:
new 226ccfc remove somne commented-out lines
226ccfc is described below
commit 226ccfc29e4b422785399e73b644b71ab6ea7350
Author: Jon Malkin <[email protected]>
AuthorDate: Thu May 21 12:08:09 2020 -0700
remove somne commented-out lines
---
python/src/kll_wrapper.cpp | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/python/src/kll_wrapper.cpp b/python/src/kll_wrapper.cpp
index ea9de42..67f0156 100644
--- a/python/src/kll_wrapper.cpp
+++ b/python/src/kll_wrapper.cpp
@@ -234,14 +234,7 @@ py::array kll_sketches<T,C,S>::is_estimation_mode() const {
template<typename T, typename C, typename S>
py::array kll_sketches<T,C,S>::get_quantiles(const std::vector<double>&
fractions,
const py::array_t<int>& isk)
const {
- //uint32_t nSketches = kll_sketches_get_num_inds(sks, isk);
- //std::vector<uint32_t> inds = kll_sketches_get_inds(isk, nSketches);
std::vector<uint32_t> inds = get_indices(isk);
-
- //auto buf = fractions.request();
- //int nQuantiles = buf.size;
- //double *ptr = (double *) buf.ptr;
-
size_t num_sketches = inds.size();
size_t num_quantiles = fractions.size();
@@ -260,14 +253,7 @@ py::array kll_sketches<T,C,S>::get_quantiles(const
std::vector<double>& fraction
template<typename T, typename C, typename S>
py::array kll_sketches<T,C,S>::get_ranks(const std::vector<T>& values,
const py::array_t<int>& isk) const {
- //uint32_t nSketches = kll_sketches_get_num_inds(sks, isk);
- //std::vector<uint32_t> inds = kll_sketches_get_inds(isk, nSketches);
std::vector<uint32_t> inds = get_indices(isk);
-
- //auto buf = values.request();
- //int nRanks = buf.size;
- //double *ptr = (double *) buf.ptr;
-
size_t num_sketches = inds.size();
size_t num_ranks = values.size();
@@ -285,15 +271,11 @@ py::array kll_sketches<T,C,S>::get_ranks(const
std::vector<T>& values,
template<typename T, typename C, typename S>
py::array kll_sketches<T,C,S>::get_pmf(const py::array_t<T>& split_points,
const py::array_t<int>& isk) const {
- //uint32_t nSketches = kll_sketches_get_num_inds(sks, isk);
- //std::vector<uint32_t> inds = kll_sketches_get_inds(isk, nSketches);
std::vector<uint32_t> inds = get_indices(isk);
-
size_t num_sketches = inds.size();
size_t num_splits = split_points.size();
std::vector<std::vector<T>> pmfs(num_sketches, std::vector<T>(num_splits +
1));
-
for (uint32_t i = 0; i < num_sketches; ++i) {
auto pmf = sketches_[inds[i]].get_PMF(split_points.data(), num_splits);
for (size_t j = 0; j <= num_splits; ++j) {
@@ -308,15 +290,11 @@ py::array kll_sketches<T,C,S>::get_pmf(const
py::array_t<T>& split_points,
template<typename T, typename C, typename S>
py::array kll_sketches<T,C,S>::get_cdf(const py::array_t<T>& split_points,
const py::array_t<int>& isk) const {
- //uint32_t nSketches = kll_sketches_get_num_inds(sks, isk);
- //std::vector<uint32_t> inds = kll_sketches_get_inds(isk, nSketches);
std::vector<uint32_t> inds = get_indices(isk);
-
size_t num_sketches = inds.size();
size_t num_splits = split_points.size();
std::vector<std::vector<T>> cdfs(num_sketches, std::vector<T>(num_splits +
1));
-
for (uint32_t i = 0; i < num_sketches; ++i) {
auto cdf = sketches_[inds[i]].get_CDF(split_points.data(), num_splits);
for (size_t j = 0; j <= num_splits; ++j) {
@@ -341,10 +319,7 @@ void kll_sketches<T,C,S>::deserialize(const py::bytes&
sk_bytes,
template<typename T, typename C, typename S>
py::list kll_sketches<T,C,S>::serialize(py::array_t<uint32_t>& isk) {
- //uint32_t nSketches = kll_sketches_get_num_inds(sks, isk);
- //std::vector<uint32_t> inds = kll_sketches_get_inds(isk, nSketches);
std::vector<uint32_t> inds = get_indices(isk);
-
const size_t num_sketches = inds.size();
py::list list(num_sketches);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]