Skip to content

#604 caused many cases of test_square in test_eye.py to fail  #613

@robinwnv

Description

@robinwnv

case-1
num.eye(5, k=1, dtype=np.float64)
np:
[[0. 1. 0. 0. 0.]
[0. 0. 1. 0. 0.]
[0. 0. 0. 1. 0.]
[0. 0. 0. 0. 1.]
[0. 0. 0. 0. 0.]]
cunumeric:
[[1. 1. 0. 0. 0.]
[0. 1. 1. 0. 0.]
[0. 0. 1. 1. 0.]
[0. 0. 0. 1. 1.]
[0. 0. 0. 0. 1.]]

case-2
num.eye(5, k=2, dtype=np.float64)
np: [[0. 0. 1. 0. 0.]
[0. 0. 0. 1. 0.]
[0. 0. 0. 0. 1.]
[0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0.]]
cunumeric:
[[0. 0. 1. 0. 0.]
[1. 0. 0. 1. 0.]
[0. 1. 0. 0. 1.]
[0. 0. 1. 0. 0.]
[0. 0. 0. 1. 0.]]

The failed case only happens on test_square
The failed cases also happens on dtype=np.int32 or None
The test k sequence here is [0, 1, -1, 2, -2]. k=1 and k=2 fail while k=-1 and k=-2 PASS.
If the test k sequence is [0, -1, 1, -2, 2], k=-1 and k=-2 would fail while k=1 and k=2 PASS.
The failure is caused by b04ca61 in pull request #604

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions