(x)
| 319 | |
| 320 | @derived_from(np) |
| 321 | def modf(x): |
| 322 | # Not actually object dtype, just need to specify something |
| 323 | tmp = elemwise(np.modf, x, dtype=object) |
| 324 | left = f"modf1-{tmp.name}" |
| 325 | right = f"modf2-{tmp.name}" |
| 326 | ldsk = { |
| 327 | (left,) + key[1:]: (getitem, key, 0) |
| 328 | for key in core.flatten(tmp.__dask_keys__()) |
| 329 | } |
| 330 | rdsk = { |
| 331 | (right,) + key[1:]: (getitem, key, 1) |
| 332 | for key in core.flatten(tmp.__dask_keys__()) |
| 333 | } |
| 334 | |
| 335 | a = np.ones_like(getattr(x, "_meta", x), shape=(1,) * x.ndim, dtype=x.dtype) |
| 336 | l, r = np.modf(a) |
| 337 | |
| 338 | graph = HighLevelGraph.from_collections(left, ldsk, dependencies=[tmp]) |
| 339 | L = Array(graph, left, chunks=tmp.chunks, meta=l) |
| 340 | graph = HighLevelGraph.from_collections(right, rdsk, dependencies=[tmp]) |
| 341 | R = Array(graph, right, chunks=tmp.chunks, meta=r) |
| 342 | return L, R |
| 343 | |
| 344 | |
| 345 | @derived_from(np) |
nothing calls this directly
no test coverage detected
searching dependent graphs…