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

Expired deprecation in scipy-1.14 results in broken CameraGeometry #2568

Closed
mexanick opened this issue Jun 26, 2024 · 2 comments
Closed

Expired deprecation in scipy-1.14 results in broken CameraGeometry #2568

mexanick opened this issue Jun 26, 2024 · 2 comments
Labels
dependencies Pull requests that update a dependency file question

Comments

@mexanick
Copy link
Contributor

Following the recent release of scipy(https://github.com/scipy/scipy/releases/tag/v1.14.0),
the CameraGeometry is now broken:

self = CameraGeometry(name='LSTCam', pix_type=PixelShape.HEXAGON, npix=1855, cam_rot=-0.000 deg, pix_rot=0.857 rad, frame=<TelescopeFrame Frame (telescope_pointing=None, obstime=None, location=None)>)
    @lazyproperty
    def neighbor_matrix(self):
>       return self.neighbor_matrix_sparse.A
E       AttributeError: 'csr_matrix' object has no attribute 'A'

It is an expired deprecation, see:
scipy/scipy#21049

As a result, we need either to promote this issue to a bug (and fix it), or pin the scipy version to be ~1.13

@mexanick mexanick added question dependencies Pull requests that update a dependency file labels Jun 26, 2024
@mexanick
Copy link
Contributor Author

I guess, a fix could be simply to use csr_matrix.toarray() instead of csr_matrix.A
https://docs.scipy.org/doc/scipy-1.12.0/reference/generated/scipy.sparse.csr_matrix.toarray.html

@mexanick mexanick changed the title Expired deprectation in scipy-1.14 results in broken CameraGeometry Expired deprecation in scipy-1.14 results in broken CameraGeometry Jun 26, 2024
maxnoe added a commit that referenced this issue Jun 26, 2024
@maxnoe
Copy link
Member

maxnoe commented Jun 26, 2024

@mexanick Yes, exactly, done here: #2569

maxnoe added a commit that referenced this issue Jun 26, 2024
@maxnoe maxnoe closed this as completed in c459e2f Jun 26, 2024
maxnoe added a commit that referenced this issue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file question
Projects
None yet
Development

No branches or pull requests

2 participants