AlexanderSaydakov commented on code in PR #322:
URL: https://github.com/apache/datasketches-cpp/pull/322#discussion_r1061977242


##########
python/src/quantiles_wrapper.cpp:
##########
@@ -114,12 +34,27 @@ void bind_quantiles_sketch(py::module &m, const char* 
name) {
   py::class_<quantiles_sketch<T>>(m, name)
     .def(py::init<uint16_t>(), py::arg("k")=quantiles_constants::DEFAULT_K)
     .def(py::init<const quantiles_sketch<T>&>())
-    .def("update", (void (quantiles_sketch<T>::*)(const T&)) 
&quantiles_sketch<T>::update, py::arg("item"),
-         "Updates the sketch with the given value")
-    .def("update", &dspy::quantiles_sketch_update<T>, py::arg("array"),
-         "Updates the sketch with the values in the given array")
+    .def(
+        "update",

Review Comment:
   perhaps. I just didn't want to make an exception for one function



##########
python/tests/vo_test.py:
##########
@@ -45,6 +45,13 @@ def test_vo_example(self):
     items = vo.get_samples()
     self.assertEqual(len(items), k)
 
+    count = 0
+    for tuple in vo:
+      sample = tuple[0]
+      weight = tuple[1]

Review Comment:
   This seems to be a bit tricky since it is not exact. So I would suggest not 
test sketch correctness here.



##########
python/tests/vo_test.py:
##########
@@ -45,6 +45,13 @@ def test_vo_example(self):
     items = vo.get_samples()
     self.assertEqual(len(items), k)
 
+    count = 0
+    for tuple in vo:
+      sample = tuple[0]
+      weight = tuple[1]

Review Comment:
   maybe, but not necessary. I just wanted to exercise the iterator and show 
how to access the pieces



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@datasketches.apache.org
For additional commands, e-mail: commits-h...@datasketches.apache.org

Reply via email to