ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 08 Mar 2013 07:11:40 -0600Read sparse matrix in Harwell-Boeing Exchange Formathttp://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/I'm currently creating some really large matrices, and hope they will end up reasonably sparse. I would like to toy with them in sage some day. Looking for a suitable standardized storage format, I just learned about the [Harwell-Boeing Exchange Format](http://math.nist.gov/MatrixMarket/formats.html#hb). **Is there some functionality provided by sage to read such files?**
If not, should I rather read the file and construct a matrix from it using a standard matrix constructor, or should I create my own matrix subclass whith an internal format that closely resembles the file format?Wed, 06 Mar 2013 10:06:33 -0600http://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/Comment by fidbc for <p>I'm currently creating some really large matrices, and hope they will end up reasonably sparse. I would like to toy with them in sage some day. Looking for a suitable standardized storage format, I just learned about the <a href="http://math.nist.gov/MatrixMarket/formats.html#hb">Harwell-Boeing Exchange Format</a>. <strong>Is there some functionality provided by sage to read such files?</strong></p>
<p>If not, should I rather read the file and construct a matrix from it using a standard matrix constructor, or should I create my own matrix subclass whith an internal format that closely resembles the file format?</p>
http://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/?comment=18092#post-id-18092Perhaps you could try the Matrix Market format, it is described in the link you posted. You can [read](http://www.scipy.org/doc/api_docs/SciPy.io.mmio.html) this format using scipy, which ships with sage.Wed, 06 Mar 2013 14:24:50 -0600http://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/?comment=18092#post-id-18092Answer by Benjamin Young for <p>I'm currently creating some really large matrices, and hope they will end up reasonably sparse. I would like to toy with them in sage some day. Looking for a suitable standardized storage format, I just learned about the <a href="http://math.nist.gov/MatrixMarket/formats.html#hb">Harwell-Boeing Exchange Format</a>. <strong>Is there some functionality provided by sage to read such files?</strong></p>
<p>If not, should I rather read the file and construct a matrix from it using a standard matrix constructor, or should I create my own matrix subclass whith an internal format that closely resembles the file format?</p>
http://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/?answer=14638#post-id-14638Actually it seems that scipy provides basic support for this format starting in version 0.10.0. According to fidelbc's comment, scipy already ships with sage. So I'd tentatively answer "yes", although I haven't tried it.Fri, 08 Mar 2013 07:11:40 -0600http://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/?answer=14638#post-id-14638