From 6ca535266967a53abdbf64669f455281f4ef3afb Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Fri, 15 Mar 2024 22:44:24 -0400 Subject: [PATCH] _extract_edge_bearings format: lines v indents --- osmnx/bearing.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/osmnx/bearing.py b/osmnx/bearing.py index 5ffe99376..136c0b617 100644 --- a/osmnx/bearing.py +++ b/osmnx/bearing.py @@ -211,11 +211,10 @@ def _extract_edge_bearings( bearings = [] weights = [] for u, v, data in G.edges(data=True): - if u == v or data["length"] < min_length: - # ignore self-loops and any edges below min_length - continue - bearings.append(data["bearing"]) - weights.append(data[weight] if weight is not None else 1.0) + # ignore self-loops and any edges below min_length + if u != v and data["length"] >= min_length: + bearings.append(data["bearing"]) + weights.append(data[weight] if weight is not None else 1.0) # drop any nulls bearings_array = np.array(bearings)