[Scipy-tickets] [SciPy] #856: maxentropy.maxentutils.sparsefeatures needs updating to use scipy.sparse

SciPy scipy-tickets@scipy....
Sat Jan 24 15:21:35 CST 2009


#856: maxentropy.maxentutils.sparsefeatures needs updating to use scipy.sparse
------------------------------+---------------------------------------------
 Reporter:  josefpktd         |       Owner:  somebody
     Type:  enhancement       |      Status:  new     
 Priority:  normal            |   Milestone:  0.8.0   
Component:  scipy.maxentropy  |     Version:  devel   
 Severity:  normal            |    Keywords:          
------------------------------+---------------------------------------------
 From mailinglist:

  I saw a reference to PySparse in
 scipy.maxentropy.maxentutils.sparsefeatures.
  Is this still required or covered by scipy.sparse?

 {{{
 > def sparsefeatures(f, x, format='csc_matrix'):
 >    """ Returns an Mx1 sparse matrix of non-zero evaluations of the
 >    scalar functions f_1,...,f_m in the list f at the point x.
 >
 >    If format='ll_mat', the PySparse module (or a symlink to it) must be
 >    available in the Python site-packages/ directory.  A trimmed-down
 >    version, patched for NumPy compatibility, is available in the SciPy
 >    sandbox/pysparse directory.
 >    """
 >    m = len(f)
 >    if format == 'll_mat':
 >        import spmatrix
 >        sparsef = spmatrix.ll_mat(m, 1)
 }}}

 scipy.sparse should have an equivalent format for everything PySparse
 provided.  The ll_mat would correspond to sparse.lil_matrix.

 Ideally, the 'format' parameter usage should be made to agree with
 what we do in scipy.sparse.  For instance:
 http://projects.scipy.org/scipy/scipy/browser/trunk/scipy/sparse/construct.py#L57

 --
 Nathan Bell

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/856>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list