(x_np)
| 86 | network = None |
| 87 | |
| 88 | def test_x(x_np): |
| 89 | for m in ["sum", "prod", "min", "max", "mean"]: |
| 90 | x = make_tensor(x_np, network) |
| 91 | y = getattr(x, m)(axis=-1, keepdims=True) |
| 92 | np.testing.assert_almost_equal(y.numpy(), getattr(x_np, m)(-1), decimal=6) |
| 93 | |
| 94 | test_x((10 * np.random.rand(10) + 1).astype("int32")) |
| 95 | test_x(np.random.rand(10).astype("float32")) |
no test coverage detected