1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
nixpkgs/pkgs/development/compilers/julia/diagonal-test.patch
Doron Behar ba9d95ca8f julia_10: rewrite
Don't use ./shared.nix as it's not shared anymore.
Fix tests with an upstream patch and a few commands in postPatch.
Assert that blas and lapack are compatible.
Rename utf8proc patch.
2020-11-17 10:45:37 +02:00

28 lines
1.2 KiB
Diff

From 9eb180c523b877a53b9e1cf53a4d5e6dad3d7bfe Mon Sep 17 00:00:00 2001
From: Lars Jellema <lars.jellema@gmail.com>
Date: Sat, 19 Sep 2020 13:52:20 +0200
Subject: [PATCH] Use approximate comparisons for diagonal tests
---
stdlib/LinearAlgebra/test/diagonal.jl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stdlib/LinearAlgebra/test/diagonal.jl b/stdlib/LinearAlgebra/test/diagonal.jl
index e420d5bc6d..7f1b5d0aec 100644
--- a/stdlib/LinearAlgebra/test/diagonal.jl
+++ b/stdlib/LinearAlgebra/test/diagonal.jl
@@ -450,8 +450,8 @@ end
M = randn(T, 5, 5)
MM = [randn(T, 2, 2) for _ in 1:2, _ in 1:2]
for transform in (identity, adjoint, transpose, Adjoint, Transpose)
- @test lmul!(transform(D), copy(M)) == *(transform(Matrix(D)), M)
- @test rmul!(copy(M), transform(D)) == *(M, transform(Matrix(D)))
+ @test lmul!(transform(D), copy(M)) ≈ *(transform(Matrix(D)), M)
+ @test rmul!(copy(M), transform(D)) ≈ *(M, transform(Matrix(D)))
@test lmul!(transform(DD), copy(MM)) == *(transform(fullDD), MM)
@test rmul!(copy(MM), transform(DD)) == *(MM, transform(fullDD))
end
--
2.28.0