()
| 688 | assert sum_result(out, np.sort) == 1000 |
| 689 | |
| 690 | def func(): |
| 691 | out = m1.permutation(Tensor(7)) |
| 692 | out_shp = out.shape |
| 693 | if isinstance(out_shp, tuple): |
| 694 | assert out_shp == (1,) |
| 695 | else: |
| 696 | assert all(out.shape.numpy() == np.array([1])) |
| 697 | n, m = 6, 3 |
| 698 | out = m1.permutation(Tensor(np.arange(n * m), dtype="float32").reshape(n, m)) |
| 699 | out_shp = out.shape |
| 700 | if isinstance(out_shp, tuple): |
| 701 | assert out_shp == (n, m) |
| 702 | else: |
| 703 | assert all(out.shape.numpy() == np.array([n, m])) |
| 704 | |
| 705 | func = trace(symbolic=symbolic)(func) |
| 706 | func() |
no test coverage detected