diff --git a/docs/history.md b/docs/history.md index ad84b90..aa9d3af 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,5 +1,9 @@ # History +## 0.4.3 (2024-02-24) + +* FIX: use len(unique) to estimate unique entry for odim range ({pull}`151`) by [@martinpaule](https://github.com/martinpaule). + ## 0.4.2 (2023-11-02) * FIX: Fix handling of sweep_mode attributes ({pull}`143`) by [@mgrover1](https://github.com/mgrover1) diff --git a/xradar/model.py b/xradar/model.py index 5a91a30..ed37b64 100644 --- a/xradar/model.py +++ b/xradar/model.py @@ -627,7 +627,7 @@ def get_range_attrs(rng=None): if rng is not None: diff = np.diff(rng) unique = np.unique(diff) - if unique: + if len(unique) == 1: spacing = "true" range_attrs["meters_between_gates"] = diff[0] else: