Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
iObs
WP2
Task 2.3
netatmoqc
Commits
c802e68f
Commit
c802e68f
authored
Nov 03, 2021
by
Paulo Medeiros
Browse files
Simplify haversine_plus_manhattan dist calculation
parent
135964c7
Pipeline
#10365
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
netatmoqc/metrics.py
View file @
c802e68f
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment