diff --git a/CHANGELOG.md b/CHANGELOG.md index 6580b577..b1201771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### v0.18.2 +* Fixed duplicate index check in `_lat_lons_from_geojson` where `s[0]` was validated twice instead of checking both `s[0]` and `s[1]` + ### v0.18.1 * Added optional `seed` parameter to `sample_proportions()` for reproducible results * Added optional `seed` parameter to `proportions_from_distribution()` for reproducible results diff --git a/datascience/maps.py b/datascience/maps.py index 652491b3..6a36c27b 100644 --- a/datascience/maps.py +++ b/datascience/maps.py @@ -904,7 +904,7 @@ def _lat_lons_from_geojson(s): GeoJSON coordinates are always stored in (longitude, latitude) order. """ - if len(s) >= 2 and isinstance(s[0], _number) and isinstance(s[0], _number): + if len(s) >= 2 and isinstance(s[0], _number) and isinstance(s[1], _number): lat, lon = s[1], s[0] return [(lat, lon)] else: