mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-09-30 20:49:37 +02:00
alpr_clusters.py - replace numpy with stdlib (#58)
This commit is contained in:
1 parent
a2dc11c5be
commit
481ea55d05
2 files changed
+3
-4
No files matched your search
@@ -5,7 +5,7 @@ from typing import Any
|
|||||||
import boto3
|
import boto3
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import numpy as np
|
import math
|
||||||
import requests
|
import requests
|
||||||
import re
|
import re
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
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)
|
tile_dict = defaultdict(list)
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
lat, lon = node["lat"], node["lon"]
|
lat, lon = node["lat"], node["lon"]
|
||||||
tile_lat = int(np.floor(lat / tile_size_degrees)) * tile_size_degrees
|
tile_lat = math.floor(lat / tile_size_degrees) * tile_size_degrees
|
||||||
tile_lon = int(np.floor(lon / tile_size_degrees)) * tile_size_degrees
|
tile_lon = math.floor(lon / tile_size_degrees) * tile_size_degrees
|
||||||
bare_node = {
|
bare_node = {
|
||||||
"id": node["id"],
|
"id": node["id"],
|
||||||
"lat": lat,
|
"lat": lat,
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
boto3
|
boto3
|
||||||
requests
|
requests
|
||||||
numpy
|
|
||||||
Reference in new issue
Block a user