MCPcopy
hub / github.com/dask/dask / __array_wrap__

Method __array_wrap__

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

Source from the content-addressed store, hash-verified

4202 return NotImplemented
4203
4204 def __array_wrap__(self, array, context=None):
4205 if isinstance(context, tuple) and len(context) > 0:
4206 if isinstance(context[1][0], np.ndarray) and context[1][0].shape == ():
4207 index = None
4208 else:
4209 index = context[1][0].index
4210 else:
4211 try:
4212 import inspect
4213
4214 method_name = f"`{inspect.stack()[3][3]}`"
4215 except IndexError:
4216 method_name = "This method"
4217 raise NotImplementedError(
4218 f"{method_name} is not implemented for `dask.dataframe.Series`."
4219 )
4220
4221 return meta_series_constructor(self)(array, index=index, name=self.name)
4222
4223 @derived_from(pd.Series)
4224 def map(self, arg, na_action=None, meta=None):

Callers

nothing calls this directly

Calls 1

meta_series_constructorFunction · 0.90

Tested by

no test coverage detected