MCPcopy Create free account
hub / github.com/dask/dask / __array_wrap__

Method __array_wrap__

dask/dataframe/dask_expr/_collection.py:2816–2830  ·  view source on GitHub ↗
(self, array, context=None)

Source from the content-addressed store, hash-verified

2814 return NotImplemented
2815
2816 def __array_wrap__(self, array, context=None):
2817 if isinstance(context, tuple) and len(context) > 0:
2818 if isinstance(context[1][0], np.ndarray) and context[1][0].shape == ():
2819 index = None
2820 else:
2821 index = context[1][0].index
2822 else:
2823 funcname = _wrapped_numpy_funcname()
2824 method_name = f"`{funcname}`" if funcname else "This method"
2825
2826 raise NotImplementedError(
2827 f"{method_name} is not implemented for `dask.dataframe.DataFrame`."
2828 )
2829
2830 return meta_frame_constructor(self)(array, index=index, columns=self.columns)
2831
2832 def _ipython_key_completions_(self):
2833 return methods.tolist(self.columns)

Callers

nothing calls this directly

Calls 2

meta_frame_constructorFunction · 0.90
_wrapped_numpy_funcnameFunction · 0.85

Tested by

no test coverage detected