Skip to content

Commit

Permalink
legibility
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Nov 13, 2023
1 parent 6adf6c4 commit 0ec1ee7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/candlex/src/tensors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ pub fn reverse(t: ExTensor, dims: Vec<usize>) -> Result<ExTensor, CandlexError>
let t_dims = t.dims();
let mut new_t = t.clone();

for i in dims {
for dim in dims {
new_t = new_t.index_select(
&Tensor::arange_step::<i64>((t_dims[i] as i64) - 1, -1, -1, device)?,
i,
&Tensor::arange_step::<i64>((t_dims[dim] as i64) - 1, -1, -1, device)?,
dim,
)?;
}

Expand Down

0 comments on commit 0ec1ee7

Please sign in to comment.