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

BUG: sparse.linalg: preserve column vector kind in iterative solvers #8723

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pv
Copy link
Member

@pv pv commented Apr 14, 2018

Ensure iterative solvers return solution x as a similar vector as the
input b is, retaining shape and ndarray vs matrix.

The issue in the original make_system code is obvious, but there are backward
compat issues which need to be considered (in particular, whether the
behavior can even be changed any more or should just be documented better).

cf. gh-8722

  • backward compatibility impact?

@pv pv added this to the 1.2.0 milestone Apr 14, 2018
@pv pv added the needs-decision Items that need further discussion before they are merged or closed label Apr 28, 2018
Ensure iterative solvers return solution `x` as a similar vector as the
input `b` is, retaining shape and ndarray vs matrix.
@pv pv changed the title WIP: BUG: sparse.linalg: preserve column vector kind in iterative solvers BUG: sparse.linalg: preserve column vector kind in iterative solvers Apr 28, 2018
@tylerjereddy
Copy link
Contributor

Should we still aim to decide on this before the approaching 1.2.0. @perimosocordiae any thoughts?

@rgommers Concerned re back compat?

@rgommers
Copy link
Member

@rgommers Concerned re back compat?

I only had time for a quick browse. It seems like the main issue is that 1-D array input now results in a different output shape, (1, N) vs (N,)?

@rgommers rgommers added the maintenance Items related to regular maintenance tasks label Oct 30, 2018
@tylerjereddy
Copy link
Contributor

There seem to be quite a few iterative solvers, so I suspect we need to be comfortable changing the outputs from all of them -- both in terms of retaining shape & fidelity to input object type. Doesn't look like anything would change from buggy to correct or the other way around, but strict user or library code could certainly require some modest maintenance.

If we didn't have back-compat concerns it would sound straightforward, but I've not touched the code on the sparse linear solvers. @perimosocordiae thoughts on disruption vs. benefit?

@tylerjereddy tylerjereddy modified the milestones: 1.2.0, 1.3.0 Nov 8, 2018
@tylerjereddy
Copy link
Contributor

Bumping milestone -- would be good to have a few people chime in before this kind of decision

@tylerjereddy
Copy link
Contributor

Similar comment as for the last release -- I'm bumping the milestone because there's a behavior change that we may not be able to make at this point, and there's no feedback on this.

The linked issue has also been quiet for the last year, so perhaps not much evidence of major disruption to users.

@tylerjereddy tylerjereddy modified the milestones: 1.3.0, 1.4.0 Apr 19, 2019
@perimosocordiae
Copy link
Member

Sorry I missed the pings on this one! I'm leaning toward documenting this behavior better, rather than changing output types. As we (the scientific Python ecosystem) continue to move away from using np.matrix, the impact of this bug should be decreasing.

For now, I'll drop the milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks needs-decision Items that need further discussion before they are merged or closed scipy.sparse.linalg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants