Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expansion short cut #131

Open
dlfivefifty opened this issue Jul 14, 2022 · 1 comment
Open

Expansion short cut #131

dlfivefifty opened this issue Jul 14, 2022 · 1 comment

Comments

@dlfivefifty
Copy link
Member

A common pattern to expand a function is:

P = Legendre()
x = axes(P,1)
f = P / P \ exp.(x)

But perhaps a shortcut would be useful so this is one line:

expand(Legendre(), exp)

That is, add the function:

function expand(P, f)
    x = axes(P,1)
    P / P \ f.(x)
end
@TSGut
Copy link
Member

TSGut commented Jul 15, 2022

Yes, this is a good idea. I think for people who may really only want to do very specific computations with the packages (sort of like what I've seen some people do with ApproxFun), having syntax that can side-step the quasimatrix concept would be helpful. And it would make the docs easier to understand if we can compare the two syntax options and say they do the same thing.

It may even be worth having an optional integer argument that gives you only the first $N$ entries of the vector (without computing the whole thing to convergence).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants