Skip to content

Commit

Permalink
Added better array typing, fixed lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
k8culver committed Apr 12, 2024
1 parent 781de5c commit 0816c28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions map.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import folium.plugins as plugins
import networkx as nx
import numpy as np
from numpy.typing import NDArray
import osmnx as ox
from scipy.spatial import cKDTree

Expand All @@ -36,7 +37,7 @@
depot_icon = folium.CustomIcon(str(depot_icon_path), icon_size=(32, 37))


def _get_coordinates(node_index_map: dict) -> np.ndarray:
def _get_coordinates(node_index_map: dict) -> NDArray:
"""Returns an array of coordinates for all nodes."""
coordinates = np.zeros((len(node_index_map), 2))
for node_index, node in node_index_map.items():
Expand Down Expand Up @@ -64,7 +65,7 @@ def generate_mapping_information(num_clients: int) -> tuple[nx.MultiDiGraph, int
map_network: ``nx.MultiDiGraph`` where nodes and edges represent locations and routes.
depot_id: Node ID of the depot location.
client_subset: List of client IDs in the map's graph.
map_bounds: list of lower and upper bound locations for map
map_bounds: List of lower and upper bound locations for map
"""
random.seed(num_clients)

Expand Down

0 comments on commit 0816c28

Please sign in to comment.