Skip to content

Commit c95b05a

Browse files
committed
rebase
1 parent f19f74d commit c95b05a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/epcsaft/python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl PyPermittivityRecord {
236236
}
237237

238238
#[pymodule]
239-
pub fn epcsaft(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
239+
pub fn epcsaft(m: &Bound<'_, PyModule>) -> PyResult<()> {
240240
m.add_class::<PyIdentifier>()?;
241241
m.add_class::<IdentifierOption>()?;
242242
m.add_class::<PyChemicalRecord>()?;

src/saftvrmie/python.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ impl_parameter!(
246246
#[pymethods]
247247
impl PySaftVRMieParameters {
248248
#[getter]
249-
fn get_k_ij<'py>(&self, py: Python<'py>) -> Option<&'py PyArray2<f64>> {
249+
fn get_k_ij<'py>(&self, py: Python<'py>) -> Option<Bound<'py, PyArray2<f64>>> {
250250
self.0
251251
.binary_records
252252
.as_ref()
253-
.map(|br| br.map(|br| br.k_ij).view().to_pyarray(py))
253+
.map(|br| br.map(|br| br.k_ij).view().to_pyarray_bound(py))
254254
}
255255

256256
fn _repr_markdown_(&self) -> String {
@@ -259,7 +259,7 @@ impl PySaftVRMieParameters {
259259
}
260260

261261
#[pymodule]
262-
pub fn saftvrmie(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
262+
pub fn saftvrmie(m: &Bound<'_, PyModule>) -> PyResult<()> {
263263
m.add_class::<PyIdentifier>()?;
264264
m.add_class::<IdentifierOption>()?;
265265

src/saftvrqmie/python.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl PySaftVRQMieParameters {
269269
/// -------
270270
/// np.ndarray
271271
#[getter]
272-
fn de_boer<'py>(&self, py: Python<'py>) -> PyResult<&'py PyArray1<f64>> {
272+
fn de_boer<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyArray1<f64>>> {
273273
let n = self.0.m.len();
274274
Ok(Array1::from_shape_fn(n, |i| -> f64 {
275275
(PLANCK
@@ -279,7 +279,7 @@ impl PySaftVRQMieParameters {
279279
.into_value()
280280
})
281281
.view()
282-
.to_pyarray(py))
282+
.to_pyarray_bound(py))
283283
}
284284

285285
/// Generate energy and force tables to be used with LAMMPS' `pair_style table` command.

0 commit comments

Comments
 (0)