Skip to content

Commit

Permalink
more float dispatch to bit repr
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 4, 2021
1 parent 080b351 commit c1177ef
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion polars/polars-core/src/chunked_array/ops/explode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub(crate) trait ExplodeByOffsets {

impl<T> ExplodeByOffsets for ChunkedArray<T>
where
T: PolarsNumericType,
T: PolarsIntegerType,
{
fn explode_by_offsets(&self, offsets: &[i64]) -> Series {
debug_assert_eq!(self.chunks.len(), 1);
Expand Down Expand Up @@ -96,6 +96,17 @@ where
}
}

impl ExplodeByOffsets for Float32Chunked {
fn explode_by_offsets(&self, offsets: &[i64]) -> Series {
self.apply_as_ints(|s| s.explode_by_offsets(offsets))
}
}
impl ExplodeByOffsets for Float64Chunked {
fn explode_by_offsets(&self, offsets: &[i64]) -> Series {
self.apply_as_ints(|s| s.explode_by_offsets(offsets))
}
}

impl ExplodeByOffsets for BooleanChunked {
fn explode_by_offsets(&self, offsets: &[i64]) -> Series {
debug_assert_eq!(self.chunks.len(), 1);
Expand Down

0 comments on commit c1177ef

Please sign in to comment.