- 
                Notifications
    You must be signed in to change notification settings 
- Fork 87
          edge case: tril!, triu! and I constructors with empty matrices
          #642
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/testsuite/construction.jl b/test/testsuite/construction.jl
index 0ed3393..482e47c 100644
--- a/test/testsuite/construction.jl
+++ b/test/testsuite/construction.jl
@@ -193,7 +193,7 @@
             x1 = AT{Float32, 2}(I, (0, 3))
 
             @test Array(x1) ≈ x
-            
+
             copyto!(x1, I)
             @test Array(x1) ≈ x
         end | 
| Thanks for the review! @maleadt | 
| d in -2:2 | ||
| A = randn(Float32, 10, 10) | ||
| @test f(A, d) == Array(f!(AT(A), d)) | ||
| @test compare(f, AT, A) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @test compare(f, AT, A) | |
| @test compare(f, AT, A, d) | 
| @test compare(f, AT, A) | ||
|  | ||
| A_empty = randn(Float32, 0, 0) | ||
| @test compare(f, AT, A_empty) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @test compare(f, AT, A_empty) | |
| @test compare(f, AT, A_empty, d) | 
Shortcuts the kernels in
triu!,tril!andidentity_kernelif the arguments are empty matrices.All three would fail with
DivideError: integer division error(from KernelAbstractions.jl).