Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Mar 26, 2024
1 parent 8700b95 commit dde9736
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion crates/polars-core/src/datatypes/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ impl<'a> AnyValue<'a> {
(av, DataType::Decimal(prec, scale)) if av.is_integer() => {
let value = av.try_extract::<i128>().unwrap();
let scale = scale.unwrap_or(0);
let factor = 10_i128.pow(scale as _); // Conversion is safe, max value is 38.
let factor = 10_i128.pow(scale as _); // Conversion to u32 is safe, max value is 38.
let Some(converted) = value.checked_mul(factor) else {
polars_bail!(ComputeError: "overflow while converting to decimal scale {}", scale)
};
Expand Down
1 change: 0 additions & 1 deletion py-polars/polars/_utils/construction/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ def _construct_series_with_fallbacks(
"""Construct Series, with fallbacks for basic type mismatch (eg: bool/int)."""
while True:
try:
print(name, values, strict)
return constructor(name, values, strict)
except TypeError as exc:
str_exc = str(exc)
Expand Down

0 comments on commit dde9736

Please sign in to comment.