Skip to content

Commit 62adc8f

Browse files
committed
remove some poor typing
1 parent 0017d8e commit 62adc8f

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/dask_histogram/boost.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ def agg_histogram(self) -> AggHistogram | None:
338338
warnings.warn("No staged AggHistogram; returning None")
339339
return self._staged
340340

341-
def to_dask_array(
342-
self, flow: bool = False, dd: bool = True
343-
) -> tuple[da.Array, ...] | tuple[da.Array, list[da.Array]]:
341+
def to_dask_array(self, flow: bool = False, dd: bool = True) -> Any:
344342
"""Convert to dask.array style of return arrays.
345343
346344
Edges are converted to match NumPy standards, with upper edge

src/dask_histogram/core.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,7 @@ def __str__(self) -> str:
339339
def __reduce__(self):
340340
return (AggHistogram, (self._dask, self._name, self._meta))
341341

342-
def to_dask_array(
343-
self, flow: bool = False, dd: bool = False
344-
) -> tuple[DaskArray, ...] | tuple[DaskArray, list[DaskArray]]:
342+
def to_dask_array(self, flow: bool = False, dd: bool = False) -> Any:
345343
"""Convert histogram object to dask.array form.
346344
347345
Parameters
@@ -383,7 +381,7 @@ def to_delayed(self, optimize_graph: bool = True) -> Delayed:
383381
def values(self, flow: bool = False) -> NDArray[Any]:
384382
return self.to_boost().values(flow=flow)
385383

386-
def variances(self, flow: bool = False) -> NDArray[Any] | None:
384+
def variances(self, flow: bool = False) -> Any:
387385
return self.to_boost().variances(flow=flow)
388386

389387
def counts(self, flow: bool = False) -> NDArray[Any]:
@@ -692,11 +690,7 @@ def _partitioned_histogram(
692690
return PartitionedHistogram(hlg, name, data[0].npartitions, histref=histref)
693691

694692

695-
def to_dask_array(
696-
agghist: AggHistogram,
697-
flow: bool = False,
698-
dd: bool = False,
699-
) -> tuple[DaskArray, ...] | tuple[DaskArray, list[DaskArray]]:
693+
def to_dask_array(agghist: AggHistogram, flow: bool = False, dd: bool = False) -> Any:
700694
"""Convert `agghist` to a `dask.array` return style.
701695
702696
Parameters

0 commit comments

Comments
 (0)