Skip to content

Commit

Permalink
Get the args order right in map...
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleaoman committed Oct 14, 2024
1 parent d9c2b46 commit a91f50b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions swiftgalaxy/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,10 @@ def dm_median_position(
args = [tuple()] * len(self.iteration_order)
if kwargs is None:
kwargs = [dict()] * len(self.iteration_order)
for sg in self:
for sg, iteration_location in zip(self, self.iteration_order):
result[sg.halo_catalogue._multi_galaxy_catalogue_mask] = func(
sg,
args[sg.halo_catalogue._multi_galaxy_catalogue_mask],
kwargs[sg.halo_catalogue._multi_galaxy_catalogue_mask],
*args[iteration_location],
**kwargs[iteration_location],
)
return result

0 comments on commit a91f50b

Please sign in to comment.