File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Use :func:`~vortex.encoding.compress` to compress the Vortex array and check the
4545
4646 >>> cvtx = vortex.compress(vtx)
4747 >>> cvtx.nbytes
48- 15732
48+ 15755
4949 >>> cvtx.nbytes / vtx.nbytes
5050 0.11...
5151
Original file line number Diff line number Diff line change @@ -163,19 +163,21 @@ pub trait ALPFloat: private::Sealed + Float + Display + 'static {
163163 . map ( |( index, _) | index as u64 )
164164 . collect ( ) ;
165165
166- if let Some ( fill_value) =
167- Self :: find_first_non_patched_encoded_value ( & encoded, & patch_indices)
168- {
169- for index in patch_indices. iter ( ) {
170- let index = * index as usize ;
171- encoded[ index] = fill_value;
166+ if !patch_indices. is_empty ( ) {
167+ if let Some ( fill_value) =
168+ Self :: first_non_patched_encoded_value ( & encoded, & patch_indices)
169+ {
170+ for index in patch_indices. iter ( ) {
171+ let index = * index as usize ;
172+ encoded[ index] = fill_value;
173+ }
172174 }
173175 }
174176
175177 ( encoded, patch_indices)
176178 }
177179
178- fn find_first_non_patched_encoded_value (
180+ fn first_non_patched_encoded_value (
179181 encoded : & [ Self :: ALPInt ] ,
180182 patch_indices : & [ u64 ] ,
181183 ) -> Option < Self :: ALPInt > {
You can’t perform that action at this time.
0 commit comments