Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I need to use the features of the Summa package but it doesn't work in Mathematica 9. It gives the error

Cannot open Utilities`FilterOptions`

My question is:

Is there an alternative (more modern) package with similar features, or a way to make Summa.m work in Mathematica 9?


Following @Nasser I solved it. The problem was that the input of FilterRules is in opposite order, e.g.

FilterOptions[Expand,{opts}]

is changed to

Sequence@@FilterRules[{opts},Options@Expand]
share|improve this question
    
oh, so the order needs to change also! good to know. I've updated Summa.m on my end, reloaded it, and now no error shows. Good to know it was this simple. –  Nasser Aug 30 '13 at 23:30
add comment

1 Answer 1

As of version 9 this has changed http://reference.wolfram.com/mathematica/Compatibility/tutorial/Utilities/FilterOptions.html

Mathematica graphics

So this package needs to use FilterRules. I Downloaded this package, and changed Summa.m according to the above, and now it loads ok.

Changed every place it said FilterOptions to Sequence@@FilterRules. Run few tests from the notebook given. Example of change:

old:

inrule1[opts___Rule]:= c_ Summa[el1_,it:{k_,__}]:>
        Summa[If[$Explode,
                Expand[c el1,FilterOptions[Expand,{opts}]],
                c el1]  ,it] /; FreeQ[c,k];

new:

inrule1[opts___Rule]:= c_ Summa[el1_,it:{k_,__}]:>
        Summa[If[$Explode,
            Expand[c el1,Sequence@@FilterRules[{opts},Expand]],
                c el1]  ,it] /; FreeQ[c,k];

now

Get["Summa.m"]

Mathematica graphics

I put the updated Summa.m in this folder here , replace your Summa.m with this version. If you find more issues with this, try to contact the author, they might have better solution or newer version.

share|improve this answer
    
Thanks a lot for your response. It is working now, except for the differential operator for sums, e.g. s = x^2 Sum[Subscript[a, k] x^k, {k, 0, Infinity}]; SumD[s, x] gives an error. Do you happen to know what happened? –  Barefeg Aug 30 '13 at 22:28
    
@Barefeg sorry, I do not use this package at all. I simply followed the instruction at WRI to upgrade it to V 9. I changed FilterOptions to Sequence@@FilterRules in all the places it was using FilterOptions. As I said, you might to contact the author on this to see why this error shows up. It might be an additional simple fix for option settings what is needed. But I do not really feel comfortable changing this package more. Do not want to break something. May be someone else will spot the problem with this use of Options. –  Nasser Aug 30 '13 at 22:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.