-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calc_geodist_exact: allow passing DataArray #299
calc_geodist_exact: allow passing DataArray #299
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #299 +/- ##
==========================================
+ Coverage 86.79% 86.89% +0.10%
==========================================
Files 38 38
Lines 1568 1580 +12
==========================================
+ Hits 1361 1373 +12
Misses 207 207
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
lt = np.repeat(lat[i : i + 1], n_points - (i + 1)) | ||
ln = np.repeat(lon[i : i + 1], n_points - (i + 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeat
is faster than tile
. Also using an array (lat[i : i + 1]
) is faster than a scalar (lat[i]
).
isort . && black . && flake8
CHANGELOG.rst
Similar to #296: allow passing
DataArray
tocalc_geodist_exact
. Again I am keeping this incomputation
for the moment. Should probably go tomesmer.geospatial
.Again, inspired by #109. Thanks @znicholls