Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Oct 11, 2024
1 parent b813e99 commit 3b6cfc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NDTensors/test/test_dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ NDTensors.dim(i::MyInd) = i.dim
@allowscalar fill!(B, zero(elt))
β = elt(2.0)
α = elt(1.0)
permutedims!!(A, B, (1,2), (a,b) -> +(*(β, a), *(α, b)))
permutedims!!(A, B, (1, 2), (a, b) -> +(*(β, a), *(α, b)))
@allowscalar 2.0 .* C == A
randn!(B)
C = copy(A)
A = permutedims!!(A, B, (1,2), (a,b) -> +(*(β, a), *(α, b)))
A = permutedims!!(A, B, (1, 2), (a, b) -> +(*(β, a), *(α, b)))
@allowscalar for i in 1:3, j in 1:4
@test A[i,j] == α * B[i,j] + β * C[i,j]
@test A[i, j] == α * B[i, j] + β * C[i, j]
end

## add elt around 2.0 to preserve the eltype of A.
Expand Down

0 comments on commit 3b6cfc5

Please sign in to comment.