(seq: ArgIterable<ArgIntoFloat>, vm: &VirtualMachine)
| 424 | |
| 425 | #[pyfunction] |
| 426 | fn fsum(seq: ArgIterable<ArgIntoFloat>, vm: &VirtualMachine) -> PyResult<f64> { |
| 427 | let values: Result<Vec<f64>, _> = |
| 428 | seq.iter(vm)?.map(|r| r.map(|v| v.into_float())).collect(); |
| 429 | pymath::math::fsum(values?).map_err(|err| pymath_exception(err, vm)) |
| 430 | } |
| 431 | |
| 432 | #[pyfunction] |
| 433 | fn modf(x: ArgIntoFloat) -> (f64, f64) { |