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

Method __array_wrap__

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

Source from the content-addressed store, hash-verified

4183 return NotImplemented
4184
4185 def __array_wrap__(self, array, context=None):
4186 if isinstance(context, tuple) and len(context) > 0:
4187 if isinstance(context[1][0], np.ndarray) and context[1][0].shape == ():
4188 index = None
4189 else:
4190 index = context[1][0].index
4191 else:
4192 try:
4193 import inspect
4194
4195 method_name = f"`{inspect.stack()[3][3]}`"
4196 except IndexError:
4197 method_name = "This method"
4198 raise NotImplementedError(
4199 f"{method_name} is not implemented for `dask.dataframe.Series`."
4200 )
4201
4202 return meta_series_constructor(self)(array, index=index, name=self.name)
4203
4204 @derived_from(pd.Series)
4205 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