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

Save & Load ChebPoly #22

Open
weymouth opened this issue May 23, 2024 · 2 comments
Open

Save & Load ChebPoly #22

weymouth opened this issue May 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@weymouth
Copy link

I'm creating a set of ChebPoly objects as a surrogate for an expensive function in a package and I need a way to save and reload these functions. Does this functionality exist?

@stevengj
Copy link
Member

I haven't written any specific serialization/deserialization routines, but you can probably just use JLD2.jl?

Alternatively, the ChebPoly data structure is pretty simple, mainly just an array of coefs, so you an save those however you want:

struct ChebPoly{N,T,Td<:Real} <: Function
coefs::Array{T,N} # chebyshev coefficients
lb::SVector{N,Td} # lower/upper bounds
ub::SVector{N,Td} # of the domain
end

@stevengj stevengj added the enhancement New feature or request label May 23, 2024
@weymouth
Copy link
Author

weymouth commented May 23, 2024 via email

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

No branches or pull requests

2 participants