We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 561cf43 commit 64946dfCopy full SHA for 64946df
cellular_raza-examples/tissue2/src/lib.rs
@@ -477,11 +477,7 @@ pub fn run_simulation<'py>(
477
.into_iter()
478
.map(|(_, (c, _))| {
479
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);
+ let array = matrix_to_py_array(py, &cell.position);
485
(
486
array,
487
[
0 commit comments