Closed
Description
It looks like your Show
instance for Array
is transposed:
λ> A.lower (A.matrix (2,2) [[1,2],[3,4]]) False
ArrayFire Array
[2 2 1 1]
1.0000 2.0000
0.0000 4.0000
λ> A.upper (A.matrix (2,2) [[1,2],[3,4]]) False
ArrayFire Array
[2 2 1 1]
1.0000 0.0000
3.0000 4.0000
Another example: exceptions thrown by matmul
suggest that the dimensions are (rows,columns):
λ> A.matmul (A.constant [2,3] 5) (A.constant [1,2] 2) A.None A.None
*** Exception: AFException {afExceptionType = SizeError, afExceptionCode = 203, afExceptionMsg = "Invalid input size"}
λ> A.matmul (A.constant [2,3] 5) (A.constant [3,1] 2) A.None A.None
ArrayFire Array
[2 1 1 1]
30.0000 30.0000
but the Show
instance suggests the opposite:
λ> (A.constant [2,3] 5)
ArrayFire Array
[2 3 1 1]
5.0000 5.0000
5.0000 5.0000
5.0000 5.0000
Metadata
Metadata
Assignees
Labels
No labels