alpr_clusters.py - replace numpy with stdlib (#58)

This commit is contained in:
Payton Ward
2025-11-21 10:15:39 -06:00
committed by GitHub
parent a2dc11c5be
commit 481ea55d05
2 changed files with 3 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ from typing import Any
import boto3
import os
import time
import numpy as np
import math
import requests
import re
from concurrent.futures import ThreadPoolExecutor
@@ -58,8 +58,8 @@ def segment_regions(nodes: Any, tile_size_degrees: int) -> dict[str, list[Any]]:
tile_dict = defaultdict(list)
for node in nodes:
lat, lon = node["lat"], node["lon"]
tile_lat = int(np.floor(lat / tile_size_degrees)) * tile_size_degrees
tile_lon = int(np.floor(lon / tile_size_degrees)) * tile_size_degrees
tile_lat = math.floor(lat / tile_size_degrees) * tile_size_degrees
tile_lon = math.floor(lon / tile_size_degrees) * tile_size_degrees
bare_node = {
"id": node["id"],
"lat": lat,

View File

@@ -1,3 +1,2 @@
boto3
requests
numpy