Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba committed Dec 27, 2024
1 parent a2a0ad5 commit bd3353e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/kornia-tensor/src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ mod tests {
fn from_raw_parts() -> Result<(), TensorError> {
let data: Vec<u8> = vec![1, 2, 3, 4];
let t = Tensor::from_raw_parts([2, 2], data.as_ptr(), data.len(), CpuAllocator)?;
std::mem::forget(data);
assert_eq!(t.shape, [2, 2]);
assert_eq!(t.as_slice(), &[1, 2, 3, 4]);
Ok(())
Expand Down

0 comments on commit bd3353e

Please sign in to comment.