Skip to content

Commit

Permalink
fix: re-raise error if conditions for dispatch not met (#253)
Browse files Browse the repository at this point in the history
* fix: re-raise error if conditions for dispatch not met

* comments

* lint
  • Loading branch information
lgray authored Aug 2, 2024
1 parent d183907 commit 68e31ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/correctionlib/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ def evaluate(
except NotImplementedError:
if any(str(type(arg)).startswith("<class 'dask_awkward.") for arg in args):
return _wrap_dask_awkward(self, *args) # type: ignore
raise
except (ValueError, TypeError):
if any(str(type(arg)).startswith("<class 'awkward.") for arg in args):
return _wrap_awkward(self._base.evalv, *args) # type: ignore
except Exception as err:
raise err
raise

if vargs:
bargs = numpy.broadcast_arrays(*vargs)
Expand Down Expand Up @@ -312,11 +312,11 @@ def evaluate(
except NotImplementedError:
if any(str(type(arg)).startswith("<class 'dask_awkward.") for arg in args):
return _wrap_dask_awkward(self, *args) # type: ignore
raise
except (ValueError, TypeError):
if any(str(type(arg)).startswith("<class 'awkward.") for arg in args):
return _wrap_awkward(self._base.evalv, *args) # type: ignore
except Exception as err:
raise err
raise

if vargs:
bargs = numpy.broadcast_arrays(*vargs)
Expand Down

0 comments on commit 68e31ea

Please sign in to comment.