Skip to content

Commit

Permalink
order params by length, dtype`
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Dec 1, 2023
1 parent 6ddbb73 commit 77881ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/polars-core/src/chunked_array/ops/arity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ where
|| (rhs.len() == 1 && rhs.downcast_get_unchecked(0).is_null_unchecked(0))
} {
let broadcast_to = lhs.len().max(rhs.len());
let arr = StaticArray::full_null(V::get_dtype(), broadcast_to);
let arr = StaticArray::full_null(broadcast_to, V::get_dtype());
return ChunkedArray::with_chunk(lhs.name(), arr);
}

Expand Down Expand Up @@ -626,7 +626,7 @@ where
|| (rhs.len() == 1 && rhs.downcast_get_unchecked(0).is_null_unchecked(0))
} {
let broadcast_to = lhs.len().max(rhs.len());
let arr = StaticArray::full_null(V::get_dtype(), broadcast_to);
let arr = StaticArray::full_null(broadcast_to, V::get_dtype());
return Ok(ChunkedArray::with_chunk(lhs.name(), arr));
}

Expand Down
2 changes: 1 addition & 1 deletion crates/polars-core/src/datatypes/static_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub trait StaticArray:
v.into_iter().collect_arr_with_dtype(dtype)
}

fn full_null(dtype: DataType, length: usize) -> Self {
fn full_null(length: usize, dtype: DataType) -> Self {
unsafe {
std::ptr::read(Box::into_raw(new_null_array(dtype.to_arrow(), length))
as *const dyn Array as *const Self)
Expand Down

0 comments on commit 77881ef

Please sign in to comment.