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

Add marshaller/s for scipy.sparse matrices #51

Open
frejanordsiek opened this issue Sep 14, 2016 · 4 comments
Open

Add marshaller/s for scipy.sparse matrices #51

frejanordsiek opened this issue Sep 14, 2016 · 4 comments
Milestone

Comments

@frejanordsiek
Copy link
Owner

Due to fixing Issue #49 , this can now be done without adding scipy as a package dependency/requirement.

Sparse matrices are useful and are additionally one of the ndarray/matrix types built into the MAT v7.3 format without resorting to classes that this package still does not support.

@frejanordsiek frejanordsiek added this to the 0.2 milestone Sep 14, 2016
@ahwillia
Copy link

ahwillia commented Jan 6, 2017

I'm trying to load a struct array that contains a bunch of sparse matrices. It's taking a very long time, probably because it is converting each of them to a dense matrix? Would it be worth it to try to dig into this and open a PR or is this a tricky enhancement? Thanks for your effort on this package - it looks real nice!

@frejanordsiek
Copy link
Owner Author

I can see it being tricky given that the Marshallers are in a bit of flux being that they are mid overhaul, but then again it may just be tricky to me and not a new set of eyes (a PR would be very welcome). I can look more in depth this week. Do know that a Marshaller for sparse matrices is one of the main priorities in order to work with the vast majority of v7.3 MAT files.

@ahwillia
Copy link

Any update on this? I would still love to have this feature... (I just re-encountered this problem today for a new dataset)

@frejanordsiek
Copy link
Owner Author

I haven't worked on it in a while. I actually ran into a major problem that I have been trying to think about that is in the way. That is, str(some_type) produces different output on different python version. For str(float), it is producing "<class 'float'>" on 3.5.3 and "<type 'float'>". This makes the current way that having marshallers can lazy load other modules brittle. I tried digging around more in the inspect module but still haven't found anything that works that well yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants