(x)
| 294 | |
| 295 | @derived_from(np) |
| 296 | def frexp(x): |
| 297 | # Not actually object dtype, just need to specify something |
| 298 | tmp = elemwise(np.frexp, x, dtype=object) |
| 299 | left = f"mantissa-{tmp.name}" |
| 300 | right = f"exponent-{tmp.name}" |
| 301 | ldsk = { |
| 302 | (left,) + key[1:]: (getitem, key, 0) |
| 303 | for key in core.flatten(tmp.__dask_keys__()) |
| 304 | } |
| 305 | rdsk = { |
| 306 | (right,) + key[1:]: (getitem, key, 1) |
| 307 | for key in core.flatten(tmp.__dask_keys__()) |
| 308 | } |
| 309 | |
| 310 | a = np.empty_like(getattr(x, "_meta", x), shape=(1,) * x.ndim, dtype=x.dtype) |
| 311 | l, r = np.frexp(a) |
| 312 | |
| 313 | graph = HighLevelGraph.from_collections(left, ldsk, dependencies=[tmp]) |
| 314 | L = Array(graph, left, chunks=tmp.chunks, meta=l) |
| 315 | graph = HighLevelGraph.from_collections(right, rdsk, dependencies=[tmp]) |
| 316 | R = Array(graph, right, chunks=tmp.chunks, meta=r) |
| 317 | return L, R |
| 318 | |
| 319 | |
| 320 | @derived_from(np) |
nothing calls this directly
no test coverage detected