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

Method __array_wrap__

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

Source from the content-addressed store, hash-verified

4232 return NotImplemented
4233
4234 def __array_wrap__(self, array, context=None):
4235 if isinstance(context, tuple) and len(context) > 0:
4236 if isinstance(context[1][0], np.ndarray) and context[1][0].shape == ():
4237 index = None
4238 else:
4239 index = context[1][0].index
4240 else:
4241 funcname = _wrapped_numpy_funcname()
4242 method_name = f"`{funcname}`" if funcname else "This method"
4243 raise NotImplementedError(
4244 f"{method_name} is not implemented for `dask.dataframe.Series`."
4245 )
4246
4247 return meta_series_constructor(self)(array, index=index, name=self.name)
4248
4249 @derived_from(pd.Series)
4250 def map(self, arg, na_action=None, meta=None):

Callers

nothing calls this directly

Calls 2

meta_series_constructorFunction · 0.90
_wrapped_numpy_funcnameFunction · 0.85

Tested by

no test coverage detected