@@ -2,7 +2,7 @@ use std::fs::File;
22use std:: io:: BufReader ;
33
44use :: e57:: { CartesianCoordinate , E57Reader } ;
5- use ndarray:: { Ix2 } ;
5+ use ndarray:: Ix2 ;
66use numpy:: PyArray ;
77use pyo3:: prelude:: * ;
88
@@ -82,15 +82,27 @@ unsafe fn read_points(py: Python<'_>, filepath: &str) -> PyResult<E57> {
8282 let n_colors = color_vec. len ( ) / 3 ;
8383 let n_intensities = intensity_vec. len ( ) ;
8484 let mut e57 = E57 {
85- points : Py :: from ( PyArray :: from_vec ( py, point_vec) . reshape ( ( nrows, 3 ) ) . unwrap ( ) ) ,
85+ points : Py :: from (
86+ PyArray :: from_vec ( py, point_vec)
87+ . reshape ( ( nrows, 3 ) )
88+ . unwrap ( ) ,
89+ ) ,
8690 color : Py :: from ( PyArray :: new ( py, ( 0 , 3 ) , false ) ) ,
8791 intensity : Py :: from ( PyArray :: new ( py, ( 0 , 1 ) , false ) ) ,
8892 } ;
8993 if n_colors == n_points {
90- e57. color = Py :: from ( PyArray :: from_vec ( py, color_vec) . reshape ( ( nrows, 3 ) ) . unwrap ( ) )
94+ e57. color = Py :: from (
95+ PyArray :: from_vec ( py, color_vec)
96+ . reshape ( ( nrows, 3 ) )
97+ . unwrap ( ) ,
98+ )
9199 }
92100 if n_intensities == n_points {
93- e57. intensity = Py :: from ( PyArray :: from_vec ( py, intensity_vec) . reshape ( ( nrows, 1 ) ) . unwrap ( ) )
101+ e57. intensity = Py :: from (
102+ PyArray :: from_vec ( py, intensity_vec)
103+ . reshape ( ( nrows, 1 ) )
104+ . unwrap ( ) ,
105+ )
94106 }
95107 Ok ( e57)
96108}
0 commit comments