Skip to content

Commit 40fc7c2

Browse files
authored
Upgrade pymath to 0.2.0 (#7429)
1 parent 430eb5f commit 40fc7c2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ optional = "0.5"
200200
parking_lot = "0.12.3"
201201
paste = "1.0.15"
202202
proc-macro2 = "1.0.105"
203-
pymath = { version = "0.1.5", features = ["mul_add", "malachite-bigint", "complex"] }
203+
pymath = { version = "0.2.0", features = ["mul_add", "malachite-bigint", "complex"] }
204204
quote = "1.0.45"
205205
radium = "1.1.1"
206206
rand = "0.9"

crates/stdlib/src/math.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ mod math {
712712
}
713713
// Finalize float path
714714
if !flt_p_values.is_empty() {
715-
let flt_result = pymath::math::sumprod(&flt_p_values, &flt_q_values);
715+
let flt_result = pymath::math::sumprod(&flt_p_values, &flt_q_values)
716+
.map_err(|err| pymath_exception(err, vm))?;
716717
let flt_obj: PyObjectRef = vm.ctx.new_float(flt_result).into();
717718
obj_total = Some(match obj_total {
718719
Some(total) => vm._add(&total, &flt_obj)?,

0 commit comments

Comments
 (0)