File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,7 @@ pub fn neighborhood_search_spatial_hashing_parallel<'py>(
7676 let py = particle_positions. py ( ) ;
7777 let element_type = particle_positions. dtype ( ) ;
7878 if element_type. is_equiv_to ( & np:: dtype :: < f32 > ( py) ) {
79- let particle_positions = particle_positions
80- . cast :: < PyArray2 < f32 > > ( ) ?
81- . try_readonly ( ) ?;
79+ let particle_positions = particle_positions. cast :: < PyArray2 < f32 > > ( ) ?. try_readonly ( ) ?;
8280 let particles: & [ Vector3 < f32 > ] = bytemuck:: cast_slice ( particle_positions. as_slice ( ) ?) ;
8381
8482 splashsurf_lib:: neighborhood_search:: neighborhood_search_spatial_hashing_parallel :: < i64 , f32 > (
@@ -88,9 +86,7 @@ pub fn neighborhood_search_spatial_hashing_parallel<'py>(
8886 & mut nl,
8987 ) ;
9088 } else if element_type. is_equiv_to ( & np:: dtype :: < f64 > ( py) ) {
91- let particle_positions = particle_positions
92- . cast :: < PyArray2 < f64 > > ( ) ?
93- . try_readonly ( ) ?;
89+ let particle_positions = particle_positions. cast :: < PyArray2 < f64 > > ( ) ?. try_readonly ( ) ?;
9490 let particles: & [ Vector3 < f64 > ] = bytemuck:: cast_slice ( particle_positions. as_slice ( ) ?) ;
9591
9692 splashsurf_lib:: neighborhood_search:: neighborhood_search_spatial_hashing_parallel :: < i64 , f64 > (
You can’t perform that action at this time.
0 commit comments