(obj)
| 496 | |
| 497 | def test_apply_output_core_dimension() -> None: |
| 498 | def stack_negative(obj): |
| 499 | def func(x): |
| 500 | return np.stack([x, -x], axis=-1) |
| 501 | |
| 502 | result = apply_ufunc(func, obj, output_core_dims=[["sign"]]) |
| 503 | if isinstance(result, xr.Dataset | xr.DataArray): |
| 504 | result.coords["sign"] = [1, -1] |
| 505 | return result |
| 506 | |
| 507 | array = np.array([[1, 2], [3, 4]]) |
| 508 | variable = xr.Variable(["x", "y"], array) |
no test coverage detected
searching dependent graphs…