-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to transformations (#3013)
* Use ndarrays instead of lists. * Make fast path for ndarrays. * Use ndarrays instead of lists. In the future, see if we can pass the underlying array pointer into GDAL directly without having to make a copy. * Allow efficient use of ufuncs. * Optimizations to AffineTransformer 1. Pre-allocate transform array. If the user creates their own AffineTransformer, they can avoid reallocating the transform array. 2. Faster construction of input_matrix 3. Faster, inplace dot product Since _ensure_arr_input is called before _transform, the typecheck is redundant. _transform method should never be called directly by the user. * Update xy method. * Reorder condition to avoid array access if possible. * Broadcast input arrays. * Only check that input arrays satisfy broadcasting requirements. Avoid allocating new arrays to store broadcasted results. * Broadcast input arrays. * Prefer np.floor over math.floor * Remove unused import.
- Loading branch information
Showing
2 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters