Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes for UV and SAFTVRQMie
  • Loading branch information
prehner committed Jan 24, 2023
commit c056a0123caa2a16304d5a3958c191c9cc7d61d0
7 changes: 6 additions & 1 deletion feos-core/src/python/parameter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,12 @@ macro_rules! impl_parameter {

#[getter]
fn get_binary_records<'py>(&self, py: Python<'py>) -> &'py PyArray2<f64> {
self.0.records().1.mapv(f64::from).view().to_pyarray(py)
self.0
.records()
.1
.mapv(|r| f64::try_from(r).unwrap())
.view()
.to_pyarray(py)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/uvtheory/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use feos_core::parameter::{
use feos_core::python::parameter::*;
use feos_core::*;
use ndarray::Array2;
use numpy::PyReadonlyArray2;
use numpy::{PyArray2, PyReadonlyArray2, ToPyArray};
use pyo3::exceptions::PyTypeError;
use pyo3::prelude::*;
use std::convert::{TryFrom, TryInto};
Expand Down