[SciPy-dev] is PySparse required for scipy.maxentropy

josef.pktd@gmai... josef.pktd@gmai...
Sat Jan 24 15:56:59 CST 2009


On Sat, Jan 24, 2009 at 4:05 PM, Nathan Bell <wnbell@gmail.com> wrote:
> On Fri, Jan 23, 2009 at 1:50 PM,  <josef.pktd@gmail.com> wrote:
>> historic artifact or not?
>>
>> 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 wnbell@gmail.com
> http://graphics.cs.uiuc.edu/~wnbell/
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>

Thanks, I added a ticket for this

Josef


More information about the Scipy-dev mailing list