Skip to content

Commit 64946df

Browse files
committed
refactor
1 parent 561cf43 commit 64946df

File tree

1 file changed

+1
-5
lines changed
  • cellular_raza-examples/tissue2/src

1 file changed

+1
-5
lines changed

cellular_raza-examples/tissue2/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,7 @@ pub fn run_simulation<'py>(
477477
.into_iter()
478478
.map(|(_, (c, _))| {
479479
let cell = c.cell;
480-
let array = numpy::ndarray::Array2::<f64>::from_shape_fn(
481-
cell.position.shape(),
482-
|(i, j)| cell.position[(i, j)],
483-
);
484-
let array = numpy::PyArray2::from_owned_array(py, array);
480+
let array = matrix_to_py_array(py, &cell.position);
485481
(
486482
array,
487483
[

0 commit comments

Comments
 (0)