Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray authored Aug 2, 2024
1 parent 858e484 commit c91157a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/correctionlib/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,14 @@ def evaluate(
for arg in args
if not isinstance(arg, (str, int, float))
]
except NotImplementedError as err:
except NotImplementedError:
if any(str(type(arg)).startswith("<class 'dask_awkward.") for arg in args):
return _wrap_dask_awkward(self, *args) # type: ignore
raise err
except (ValueError, TypeError) as err:
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
raise err
except Exception as err:
raise err
raise

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

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

0 comments on commit c91157a

Please sign in to comment.