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+TST: setdiag implementation for dia_matrix (Close #2931) + test_setdiag (was untested) #2932

Closed
wants to merge 6 commits into from

Conversation

yarikoptic
Copy link
Contributor

Revealed similar lack of setdiag imlementation for COO and BSR matrices (TODO)

…est_setdiag (was untested)

Revealed similar lack of setdiag imlementation for COO and BSR matrices (TODO)
@pv
Copy link
Member

pv commented Sep 26, 2013

Before this PR can be merged, either the BSR/COO setdiags need to be implemented, or the tests stubbed out to knownfailures (see the bottom of TestDOK class definition on how to do that)

@yarikoptic
Copy link
Contributor Author

here you go (marked as known failure)

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 856b7c1 on yarikoptic:master into c026262 on scipy:master.

M, N = self.shape
if (not k in self.offsets):
raise ValueError(
"dia matrix does not support assignment for unknown diagonals. "
Copy link
Member

Choose a reason for hiding this comment

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

It might be nice to handle also this case, as it seems it could be done with a couple of lines of code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pull requests are welcome!

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I'm not saying here that you should tackle it, but that it should be addressed before merging this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and meanwhile scipy should stay instead with a completely broken version instead of a partially implemented with a consistent error message (may be actually NotImplemented instead of ValueError would be better)?

oh well

Copy link
Member

Choose a reason for hiding this comment

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

Yes. The next release will be in next spring. It's better to do it right in the first round.

@perimosocordiae
Copy link
Member

Bump. I've fixed the outstanding TODOs for this PR here, but @yarikoptic seems to be busy with other things. I can roll all the changes into a new PR on this repo, if that would help.

enable setdiag for non pre-existing offsets
@yarikoptic
Copy link
Contributor Author

Thank you @perimosocordiae and sorry -- I have missed your PR in time. Merged/updated this PR now

@yarikoptic
Copy link
Contributor Author

Anyone from scipy team could possibly have a look and direct us further to get this PR finally accepted?

@rgommers
Copy link
Member

rgommers commented Jan 4, 2014

@pv your comments seem to have been addressed. Do you have time to review this, or should I have a closer look?

pv added a commit that referenced this pull request Feb 2, 2014
BUG: sparse: setdiag implementation for dia_matrix
@pv
Copy link
Member

pv commented Feb 2, 2014

Thanks, rebased and merged.
Also fixed a remaining bug with unintended self.offsets dtype promotion (which would cause e.g. matrix multiplication to fail later on).

@pv pv closed this Feb 2, 2014
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.

None yet

5 participants