Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-vi committed Oct 2, 2024
1 parent 585de56 commit 6a90cdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 4 additions & 10 deletions crates/polars-core/src/series/into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,10 @@ impl Series {
s.to_arrow(0, compat_level)
};

let dtype = FixedSizeListArray::default_datatype(
inner.to_arrow(compat_level),
width.clone(),
);
let arr = FixedSizeListArray::new(
dtype,
arr.len().clone(),
new_values,
arr.validity().cloned(),
);
let dtype =
FixedSizeListArray::default_datatype(inner.to_arrow(compat_level), *width);
let arr =
FixedSizeListArray::new(dtype, arr.len(), new_values, arr.validity().cloned());
Box::new(arr)
},
#[cfg(feature = "dtype-categorical")]
Expand Down
2 changes: 2 additions & 0 deletions py-polars/tests/unit/interop/test_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_arrow_list_chunked_array() -> None:
s = cast(pl.Series, pl.from_arrow(ca))
assert s.dtype == pl.List


# Test that polars convert Arrays of logical types correctly to arrow
def test_arrow_array_logical() -> None:
# cast to large string and uint32 indices because polars converts to those
Expand All @@ -103,6 +104,7 @@ def test_arrow_array_logical() -> None:
)
assert s2.to_arrow() == pa_array_logical2


def test_from_dict() -> None:
data = {"a": [1, 2], "b": [3, 4]}
df = pl.from_dict(data)
Expand Down

0 comments on commit 6a90cdb

Please sign in to comment.