Skip to content
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

PERF: Disable unnecessary copy in dtype conversion for buffer #905

Merged
merged 1 commit into from
Aug 21, 2021

Conversation

snowman2
Copy link
Member

@snowman2 snowman2 commented Aug 21, 2021

  • Fully documented, including history.rst for all changes and api/*.rst for new API

https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html

By default, astype always returns a newly allocated array. If this is set to false, and the dtype, order, and subok requirements are satisfied, the input array is returned instead of a copy.

Since copy is explicitly called beforehand, copy=False should be safe.

UPDATE: see #915

@codecov
Copy link

codecov bot commented Aug 21, 2021

Codecov Report

Merging #905 (d5d5fe8) into master (be6e991) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #905   +/-   ##
=======================================
  Coverage   95.37%   95.37%           
=======================================
  Files          21       21           
  Lines        1729     1729           
=======================================
  Hits         1649     1649           
  Misses         80       80           
Impacted Files Coverage Δ
pyproj/utils.py 72.58% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be6e991...d5d5fe8. Read the comment docs.

@snowman2 snowman2 merged commit df07890 into pyproj4:master Aug 21, 2021
@snowman2 snowman2 deleted the perf branch August 22, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant