diff --git a/climada/hazard/centroids/centr.py b/climada/hazard/centroids/centr.py index 318439030..9e6e5a809 100644 --- a/climada/hazard/centroids/centr.py +++ b/climada/hazard/centroids/centr.py @@ -241,7 +241,7 @@ def from_geodataframe(cls, gdf): Centroids Centroids built from the geodataframe. """ - if np.any(geom.geom_type != 'Point'): + if np.any(gdf.geom_type != 'Point'): raise ValueError( 'The inpute geodataframe contains geometries' ' that are not points.'