MCPcopy Index your code
hub / github.com/pydata/xarray / Method

Class Method

xarray/util/generate_aggregations.py:329–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327
328
329class Method:
330 def __init__(
331 self,
332 name,
333 bool_reduce=False,
334 extra_kwargs=tuple(),
335 numeric_only=False,
336 see_also_modules=("numpy", "dask.array"),
337 see_also_methods=(),
338 min_flox_version=None,
339 additional_notes="",
340 aggregation_type: Literal["reduce", "scan"] = "reduce",
341 ):
342 self.name = name
343 self.extra_kwargs = extra_kwargs
344 self.numeric_only = numeric_only
345 self.see_also_modules = see_also_modules
346 self.see_also_methods = see_also_methods
347 self.min_flox_version = min_flox_version
348 self.additional_notes = additional_notes
349 self.aggregation_type = aggregation_type
350 if bool_reduce:
351 self.array_method = f"array_{name}"
352 self.np_example_array = (
353 """np.array([True, True, True, True, True, False], dtype=bool)"""
354 )
355
356 else:
357 self.array_method = name
358 self.np_example_array = """np.array([1, 2, 3, 0, 2, np.nan])"""
359
360
361@dataclass

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…