Skip to content

Missing (deprecated) matrix_product from astropy in ecliptic.py #18

Description

@TheWand3rer

🐞 Ecliptic.py tries to import matrix_product from astropy but it has since been deprecated

I was trying to run the Multiple revolutions on Lambert’s problem and it failed on the imports because as the title says it cannot import that function from astropy.

Looking at their repo it seems that function has been deprecated.

File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\hapsira\frames\ecliptic.py", line 14, in <module>
    from astropy.coordinates.matrix_utilities import (
ImportError: cannot import name 'matrix_product' from 'astropy.coordinates.matrix_utilities' 
(C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\astropy\coordinates\matrix_utilities.py)

🖥 Please paste the output of following commands

  • conda info -a (only if you have conda)
  • conda list (only if you have conda)
  • pip freeze
Details
# Paste your output here:
astropy==7.0.0
astropy-iers-data==0.2024.12.30.0.33.36
astroquery==0.4.7
backports.tarfile==1.2.0
beautifulsoup4==4.12.3
certifi==2024.12.14
charset-normalizer==3.4.1
contourpy==1.3.1
cycler==0.12.1
fonttools==4.55.3
hapsira==0.18.0
html5lib==1.1
idna==3.10
importlib_metadata==8.5.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jplephem==2.22
keyring==25.6.0
kiwisolver==1.4.8
llvmlite==0.43.0
matplotlib==3.7.5
more-itertools==10.5.0
numba==0.60.0
numpy==2.0.0
packaging==24.2
pandas==2.2.3
pillow==11.0.0
plotly==5.24.1
pyerfa==2.0.1.5
pyparsing==3.2.1
python-dateutil==2.9.0.post0
pytz==2024.2
pyvo==1.6
pywin32-ctypes==0.2.3
PyYAML==6.0.2
requests==2.32.3
scipy==1.14.1
six==1.17.0
soupsieve==2.6
tenacity==9.0.0
tzdata==2024.2
urllib3==2.3.0
webencodings==0.5.1
zipp==3.21.0

💡 Possible solutions

I'm not very knowledgeable in Python, so for the moment I have just readded function in the astropy package script. I'm sure it would be a simple solution otherwise. Perhaps calling the reduce(np.matmul, matrices) function directly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions