MCPcopy
hub / github.com/pydata/xarray / twice

Function twice

xarray/tests/test_computation.py:229–233  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

227 dataset = xr.Dataset({"y": variable}, {"x": -array})
228
229 def twice(obj):
230 def func(x):
231 return (x, x)
232
233 return apply_ufunc(func, obj, output_core_dims=[[], []])
234
235 out0, out1 = twice(array)
236 assert_identical(out0, array)

Calls 1

apply_ufuncFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…