Skip to content

Commit bce4b85

Browse files
committed
Fix set_row internal logic to handle unit vectors
1 parent 39ab7a5 commit bce4b85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/index.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ pub fn set_row<T>(inout: &mut Array<T>, new_row: &Array<T>, row_num: u64)
298298
where
299299
T: HasAfEnum,
300300
{
301-
let seqs = [
302-
Seq::new(row_num as f64, row_num as f64, 1.0),
303-
Seq::default(),
304-
];
301+
let mut seqs = vec![Seq::new(row_num as f64, row_num as f64, 1.0)];
302+
if inout.dims().ndims() > 1 {
303+
seqs.push(Seq::default());
304+
}
305305
assign_seq(inout, &seqs, new_row)
306306
}
307307

0 commit comments

Comments
 (0)