Skip to content

Commit

Permalink
fix doc string position
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey committed Dec 3, 2024
1 parent 49b836f commit d63dba5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/dask_awkward/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1956,19 +1956,6 @@ def __init__(self, the_fn, arg_repackers, kwarg_repacker, arg_lens_for_repackers
self.arg_lens_for_repackers = arg_lens_for_repackers

def _repack(self, *args_deps_expanded):
args = []
len_args = 0
for repacker, n_args in zip(self.arg_repackers, self.arg_lens_for_repackers):
args.append(
repacker(args_deps_expanded[len_args : len_args + n_args])[0]
if repacker is not None
else args_deps_expanded[len_args]
)
len_args += n_args
kwargs = self.kwarg_repacker(args_deps_expanded[len_args:])[0]
return args, kwargs

def __call__(self, *args_deps_expanded):
"""This packing function receives a list of strictly
ordered arguments. The first range of arguments,
[0:sum(self.arg_lens_for_repackers)], corresponding to
Expand All @@ -1982,6 +1969,19 @@ def __call__(self, *args_deps_expanded):
The various repackers deal with restructuring the received flattened
list into the shape that self.fn expects.
"""
args = []
len_args = 0
for repacker, n_args in zip(self.arg_repackers, self.arg_lens_for_repackers):
args.append(
repacker(args_deps_expanded[len_args : len_args + n_args])[0]
if repacker is not None
else args_deps_expanded[len_args]
)
len_args += n_args
kwargs = self.kwarg_repacker(args_deps_expanded[len_args:])[0]
return args, kwargs

def __call__(self, *args_deps_expanded):
args, kwargs = self._repack(*args_deps_expanded)
return self.fn(*args, **kwargs)

Expand Down

0 comments on commit d63dba5

Please sign in to comment.