Skip to content

Commit

Permalink
Dict comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Jan 7, 2025
1 parent 0463e8e commit ed4b61e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hats_import/catalog/resume_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ def get_alignment_file(
alignment = pickle.load(pickle_file)
non_none_elements = alignment[alignment != np.array(None)]
pixel_list = np.unique(non_none_elements)
self.destination_pixel_map = dict(
[(HealpixPixel(order, pix), count) for (order, pix, count) in pixel_list if int(count) > 0]
)
self.destination_pixel_map = {
HealpixPixel(order, pix): count for (order, pix, count) in pixel_list if int(count) > 0
}
total_rows = sum(self.destination_pixel_map.values())
if total_rows != expected_total_rows:
raise ValueError(
Expand Down

0 comments on commit ed4b61e

Please sign in to comment.