Simplify doesn't simplify SparseArrays

Discussion in 'Mathematica' started by Scott Morrison, Jul 21, 2004.

  1. For example, I was expecting


    to return the same as


    but it doesn't. Any suggestions for a modification? I was thinking of
    unprotecting SparseArray, and defining

    SparseArray /: Simplify[sa_SparseArray] :=

    Should this work? Would it be better for this definition to go with
    Simplify rather than SparseArray?

    Thanks, Scott Morrison
    Scott Morrison, Jul 21, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.