sparsemat / sprs

sparse linear algebra library for rust
Apache License 2.0
394 stars 46 forks source link

Fix matrixmarket read/write complex #305

Closed chetmurthy closed 2 years ago

chetmurthy commented 2 years ago

This PR adds support for read/write of MatrixMarket files in complex format compatible with scipy.

Also, fixes symmetric and skew-symmetric read/write, and a bug in a test.

Added tests to cover new behaviour.

chetmurthy commented 2 years ago

If you would like more comments (e.g. for the tests, where, yeah, I kinda feel like I ought to add comments, but since none of yours did, I figured I'd ask first what you prefer), let me know.

chetmurthy commented 2 years ago

I'm not sure how to deal with this Miri failure. It appears to be coming from code that is identical to the start of other tests -- the code that opens a file. Can you please advise ?

P.S. I'm impressed with the thoroughness of testing.

mulimoen commented 2 years ago

Great, all that is missing is an entry in the changelog

chetmurthy commented 2 years ago

If you're OK with it, I'll next go and implement I/O for Hermitian matrices. Fun!

mulimoen commented 2 years ago

Do you want to support Hermitian matrices in this PR or another one?

chetmurthy commented 2 years ago

Ah. I thought I should do it in another. Get this done correctly, then move on to the next.

mulimoen commented 2 years ago

Thanks for your patience @chetmurthy, excellent job on this

chetmurthy commented 2 years ago

Hey, it's me that thanks you, b/c I only started coding Rust 2.5wk ago. I learned a ton about Rust, just writing this PR. And BTW, if you have one or two really easy issues you'd like somebody to knock out, I'd be happy to take 'em. Good practice and learning!