From 89026183db63a1784e71254425e10da711809e4d Mon Sep 17 00:00:00 2001 From: drodarie Date: Mon, 25 Mar 2024 15:37:12 +0100 Subject: [PATCH] Implement review feedback. --- atlas_densities/densities/fitting.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/atlas_densities/densities/fitting.py b/atlas_densities/densities/fitting.py index 9a521d6..7d2c440 100644 --- a/atlas_densities/densities/fitting.py +++ b/atlas_densities/densities/fitting.py @@ -18,9 +18,10 @@ """ from __future__ import annotations +import itertools as it import logging import warnings -from typing import TYPE_CHECKING, Dict, List, Optional, Set, Union +from typing import TYPE_CHECKING, Dict, List, Optional, Union import numpy as np import pandas as pd @@ -623,10 +624,7 @@ def _get_group_region_names(groups): A list of region names. """ - group_regions_names: Set[str] = set() - for v in groups.values(): - group_regions_names = group_regions_names.union(v) - return list(group_regions_names) + return list(set(it.chain.from_iterable(groups.values()))) def linear_fitting( # pylint: disable=too-many-arguments