Skip to content

Commit b91740d

Browse files
authored
Merge pull request #336 from apache/4.0-cleanup
4.0 cleanup
2 parents 84edaf4 + 6f47288 commit b91740d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache DataSketches C++ and Python
2-
Copyright 2022 The Apache Software Foundation
2+
Copyright 2023 The Apache Software Foundation
33

44
Copyright 2015-2018 Yahoo Inc.
55
Copyright 2019-2020 Verizon Media

cpc/include/cpc_compressor_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ uint8_t cpc_compressor<A>::determine_pseudo_phase(uint8_t lg_k, uint32_t c) {
449449
if (lg_k < 4) throw std::logic_error("lgK < 4");
450450
const size_t tmp = c >> (lg_k - 4);
451451
const uint8_t phase = tmp & 15;
452-
if (phase < 0 || phase >= 16) throw std::out_of_range("wrong phase");
452+
if (phase >= 16) throw std::out_of_range("wrong phase");
453453
return phase;
454454
}
455455
}

python/src/vector_of_kll.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class vector_of_kll_sketches {
7272
std::string to_string(bool print_levels = false, bool print_items = false) const;
7373

7474
// binary output/input
75-
py::list serialize(py::array_t<uint32_t>& isk);
75+
py::list serialize(const py::array_t<int>& isk);
7676
// note: deserialize() replaces the sketch at the specified
7777
// index. Not a static method.
7878
void deserialize(const py::bytes& sk_bytes, uint32_t idx);
@@ -404,7 +404,7 @@ void vector_of_kll_sketches<T, C>::deserialize(const py::bytes& sk_bytes,
404404
}
405405

406406
template<typename T, typename C>
407-
py::list vector_of_kll_sketches<T, C>::serialize(py::array_t<uint32_t>& isk) {
407+
py::list vector_of_kll_sketches<T, C>::serialize(const py::array_t<int>& isk) {
408408
std::vector<uint32_t> inds = get_indices(isk);
409409
const size_t num_sketches = inds.size();
410410

0 commit comments

Comments
 (0)