Commit c802e68f authored by Paulo Medeiros's avatar Paulo Medeiros
Browse files

Simplify haversine_plus_manhattan dist calculation

parent 135964c7
Pipeline #10365 failed with stage
in 0 seconds
......@@ -141,9 +141,7 @@ def calc_distance_matrix_haversine_plus_manhattan_numba(df, weights):
i, j = _data_index_to_matrix_index(nrows, idist, check_bounds=False)
rtn[idist] = weights_internal[0] * haversine_distance(
df[i], df[j]
) + np.sum(
np.sqrt((weights_internal[1:] * (df[j, 2:] - df[i, 2:])) ** 2)
)
) + np.sum(np.abs(weights_internal[1:] * (df[j, 2:] - df[i, 2:])))
return rtn
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment