1+ use crate :: NumpyUsize ;
2+ use crate :: utils;
3+ use crate :: utils:: { enum_impl_from, enum_wrapper_impl_from} ;
14use bytemuck:: { NoUninit , Pod } ;
25use ndarray:: Array2 ;
36use numpy as np;
@@ -6,7 +9,7 @@ use numpy::{Element, PyArray, PyArray1, PyArray2, PyArrayDescr, PyUntypedArray};
69use pyo3:: IntoPyObjectExt ;
710use pyo3:: exceptions:: { PyTypeError , PyValueError } ;
811use pyo3:: prelude:: * ;
9- use pyo3:: types:: { IntoPyDict , PyDict , PyTuple } ;
12+ use pyo3:: types:: { IntoPyDict , PyDict } ;
1013use pyo3_stub_gen:: derive:: * ;
1114use splashsurf_lib:: mesh:: TriangleCell ;
1215use splashsurf_lib:: {
@@ -18,10 +21,7 @@ use splashsurf_lib::{
1821 nalgebra:: { Unit , Vector3 } ,
1922} ;
2023use std:: ops:: Deref ;
21-
22- use crate :: NumpyUsize ;
23- use crate :: utils;
24- use crate :: utils:: { enum_impl_from, enum_wrapper_impl_from} ;
24+ use std:: path:: PathBuf ;
2525
2626fn view_triangles_generic < ' py > (
2727 triangles : & [ TriangleCell ] ,
@@ -209,7 +209,7 @@ impl PyTriMesh3d {
209209 #[ pyo3( signature = ( path, * , file_format = Some ( "vtk42" ) ) ) ]
210210 pub fn write_to_file < ' py > (
211211 this : Bound < ' py , Self > ,
212- path : & str ,
212+ path : PathBuf ,
213213 file_format : Option < & str > ,
214214 ) -> PyResult < ( ) > {
215215 let py = this. py ( ) ;
@@ -308,7 +308,7 @@ impl PyMixedTriQuadMesh3d {
308308 #[ pyo3( signature = ( path, * , file_format = Some ( "vtk42" ) ) ) ]
309309 pub fn write_to_file < ' py > (
310310 this : Bound < ' py , Self > ,
311- path : & str ,
311+ path : PathBuf ,
312312 file_format : Option < & str > ,
313313 ) -> PyResult < ( ) > {
314314 let py = this. py ( ) ;
@@ -727,9 +727,9 @@ impl PyMeshWithData {
727727 ///
728728 /// There has to be exactly one attribute value per vertex in the mesh.
729729 /// As attribute data, the following numpy array types are supported:
730- /// - 1D array with shape (N,) of `np.uint64`
731- /// - 1D array with shape (N,) of the mesh scalar type (`np.float32` or `np.float64`)
732- /// - 2D array with shape (N,3) of the mesh scalar type (`np.float32` or `np.float64`)
730+ /// - 1D array with shape (N,) of `` np.uint64` `
731+ /// - 1D array with shape (N,) of the mesh scalar type (`` np.float32`` or `` np.float64` `)
732+ /// - 2D array with shape (N,3) of the mesh scalar type (`` np.float32`` or `` np.float64` `)
733733 /// The data is copied into the mesh object.
734734 pub fn add_point_attribute < ' py > (
735735 & mut self ,
@@ -763,9 +763,9 @@ impl PyMeshWithData {
763763 ///
764764 /// There has to be exactly one attribute value per cell in the mesh.
765765 /// As attribute data, the following numpy array types are supported:
766- /// - 1D array with shape (N,) of `np.uint64`
767- /// - 1D array with shape (N,) of the mesh scalar type (`np.float32` or `np.float64`)
768- /// - 2D array with shape (N,3) of the mesh scalar type (`np.float32` or `np.float64`)
766+ /// - 1D array with shape (N,) of `` np.uint64` `
767+ /// - 1D array with shape (N,) of the mesh scalar type (`` np.float32`` or `` np.float64` `)
768+ /// - 2D array with shape (N,3) of the mesh scalar type (`` np.float32`` or `` np.float64` `)
769769 /// The data is copied into the mesh object.
770770 pub fn add_cell_attribute < ' py > (
771771 & mut self ,
@@ -799,7 +799,7 @@ impl PyMeshWithData {
799799 #[ pyo3( signature = ( path, * , file_format = Some ( "vtk42" ) ) ) ]
800800 pub fn write_to_file < ' py > (
801801 this : Bound < ' py , Self > ,
802- path : & str ,
802+ path : PathBuf ,
803803 file_format : Option < & str > ,
804804 ) -> PyResult < ( ) > {
805805 let py = this. py ( ) ;
0 commit comments