diff --git a/import-automation/executor/requirements.txt b/import-automation/executor/requirements.txt index e4a92c59f6..7ee91417a2 100644 --- a/import-automation/executor/requirements.txt +++ b/import-automation/executor/requirements.txt @@ -34,7 +34,7 @@ gspread gunicorn legacy-cgi lxml -numpy<=2.0.0 +numpy openpyxl pandas omegaconf diff --git a/scripts/us_census/geojsons_low_res/simplify.py b/scripts/us_census/geojsons_low_res/simplify.py index 2a506d573b..012d4054c6 100644 --- a/scripts/us_census/geojsons_low_res/simplify.py +++ b/scripts/us_census/geojsons_low_res/simplify.py @@ -85,7 +85,10 @@ def simplify(self, input=None, epsilon=0.01): assert len(coords[i]) == 1 c = coords[i][0] original_size += len(c) - new_c = rdp.rdp(c, epsilon=epsilon) + # Pad to 3D to avoid NumPy 2.0+ deprecation/error on np.cross(2D) in rdp library + c_3d = [[p[0], p[1], 0.0] for p in c] + new_c_3d = rdp.rdp(c_3d, epsilon=epsilon) + new_c = [[p[0], p[1]] for p in new_c_3d] simplified_size += len(new_c) if len(new_c) >= 3: # Simplify the polygon succeeded, not yielding a line