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

Fix to array shorthand not defined #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ythevalil-dd
Copy link
Collaborator

The shorhand A for the toarray method is not always available on recent versions of scipy. This PR changes the shorthand uses to the full method name to ensure we don't run into issues on python 3.11.

@ythevalil-dd ythevalil-dd marked this pull request as ready for review September 26, 2024 12:37
@ythevalil-dd ythevalil-dd force-pushed the fix/to-array-shorthand-not-defined branch from 54d95e7 to 803e0bd Compare September 26, 2024 12:38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you keep .A at lines 245, 379, 398, 481 and 508?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .A shorthand is no longer available for the coo_matrix object in scipy, and the other objects still using the shorthand are other types. These other types only have the shorthand implemented and don't have the standard fullname toarray method, so we need to keep the other lines as they are.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you document it somewhere please (at the first occurrence of a coo_matrix calling .A)?

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.

2 participants