diff --git a/NOTICE b/NOTICE index ca56c4fb..90fb13c6 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache DataSketches C++ and Python -Copyright 2022 The Apache Software Foundation +Copyright 2023 The Apache Software Foundation Copyright 2015-2018 Yahoo Inc. Copyright 2019-2020 Verizon Media diff --git a/cpc/include/cpc_compressor_impl.hpp b/cpc/include/cpc_compressor_impl.hpp index ef0ce619..7f323be7 100644 --- a/cpc/include/cpc_compressor_impl.hpp +++ b/cpc/include/cpc_compressor_impl.hpp @@ -449,7 +449,7 @@ uint8_t cpc_compressor::determine_pseudo_phase(uint8_t lg_k, uint32_t c) { if (lg_k < 4) throw std::logic_error("lgK < 4"); const size_t tmp = c >> (lg_k - 4); const uint8_t phase = tmp & 15; - if (phase < 0 || phase >= 16) throw std::out_of_range("wrong phase"); + if (phase >= 16) throw std::out_of_range("wrong phase"); return phase; } } diff --git a/python/src/vector_of_kll.cpp b/python/src/vector_of_kll.cpp index db30af62..68e418c3 100644 --- a/python/src/vector_of_kll.cpp +++ b/python/src/vector_of_kll.cpp @@ -72,7 +72,7 @@ class vector_of_kll_sketches { std::string to_string(bool print_levels = false, bool print_items = false) const; // binary output/input - py::list serialize(py::array_t& isk); + py::list serialize(const py::array_t& isk); // note: deserialize() replaces the sketch at the specified // index. Not a static method. void deserialize(const py::bytes& sk_bytes, uint32_t idx); @@ -404,7 +404,7 @@ void vector_of_kll_sketches::deserialize(const py::bytes& sk_bytes, } template -py::list vector_of_kll_sketches::serialize(py::array_t& isk) { +py::list vector_of_kll_sketches::serialize(const py::array_t& isk) { std::vector inds = get_indices(isk); const size_t num_sketches = inds.size();