Skip to content

Commit

Permalink
Merge pull request #6376 from ayshih/matrix_product
Browse files Browse the repository at this point in the history
Removes lingering use of Astropy's `matrix_product()`
  • Loading branch information
dstansby committed Aug 23, 2022
2 parents 17d3bda + bb971e3 commit 47224c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/6376.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switched to using the standard matrix-multiplication operator (available in Python 3.5+) instead of a custom function.
4 changes: 2 additions & 2 deletions sunpy/coordinates/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.builtin_frames import make_transform_graph_docs
from astropy.coordinates.builtin_frames.utils import get_jd12
from astropy.coordinates.matrix_utilities import matrix_product, matrix_transpose, rotation_matrix
from astropy.coordinates.matrix_utilities import matrix_transpose, rotation_matrix
from astropy.coordinates.representation import (
CartesianRepresentation,
SphericalRepresentation,
Expand Down Expand Up @@ -806,7 +806,7 @@ def _rotation_matrix_hme_to_hee(hmeframe):
tilt_matrix = _rotation_matrix_reprs_to_reprs(sun_earth_hme.transform(rot_matrix),
CartesianRepresentation(1, 0, 0))

return matrix_product(tilt_matrix, rot_matrix)
return tilt_matrix @ rot_matrix


@frame_transform_graph.transform(FunctionTransformWithFiniteDifference,
Expand Down

0 comments on commit 47224c1

Please sign in to comment.