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

Adds retime #529

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ValentinKaisermayer
Copy link
Contributor

Closes #439

@ValentinKaisermayer
Copy link
Contributor Author

It works off of #528

@ValentinKaisermayer
Copy link
Contributor Author

@iblislin What do you think about the interface? I have chosen singleton types instead of Symbols so that a dispatch system can be implemented.

@iblislin
Copy link
Collaborator

iblislin commented Dec 16, 2024

What do you think about the interface? I have chosen singleton types instead of Symbols so that a dispatch system can be implemented.

well, I personally prefer the Symbol, and build with literal type dispatching.

e.g.

julia> f(::Val{:abc}) = 42
f (generic function with 1 method)

julia> f(x::Symbol) = f(Val(x))
f (generic function with 2 methods)

julia> f(:abc)
42

but I'm not sure about the performance penalty. Maybe you could give that a try.

@ValentinKaisermayer ValentinKaisermayer marked this pull request as ready for review December 17, 2024 12:40
@ValentinKaisermayer
Copy link
Contributor Author

@iblislin I added a documentation page as well.

@iblislin
Copy link
Collaborator

Could you sync (rebase or just merge) this branch with master?

minor

return iterator and adds test

starts to add retime

changes _split

changes LTS

overload Base.split

changes interface of _split to return timestamps
adds missing deps

another missing dep

support symbols as well

handle missing data

adds docs on retime

minor
@ValentinKaisermayer
Copy link
Contributor Author

Could you sync (rebase or just merge) this branch with master?

Done

@ValentinKaisermayer
Copy link
Contributor Author

@iblislin any thoughts?

@iblislin
Copy link
Collaborator

iblislin commented Jan 22, 2025

Any idea about the Documenter build failures?

Tons of segfault 🤔
https://github.com/JuliaStats/TimeSeries.jl/actions/runs/12873732102/job/35891842966?pr=529#step:7:1

new_values = __get_new_values(
T, length(new_timestamps), size(values(ta), 2), extrapolate, skip_missing
)
old_timestamps = convert(Vector{DN}, timestamp(ta))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why the convert is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is since Dates.value is different for Dates and DateTimes. But the source TimeArray and the given time vector might are different.

@ValentinKaisermayer
Copy link
Contributor Author

Any idea about the Documenter build failures?

Tons of segfault 🤔 https://github.com/JuliaStats/TimeSeries.jl/actions/runs/12873732102/job/35891842966?pr=529#step:7:1

Not really.

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

Successfully merging this pull request may close these issues.

Add Matlab-like retime method
2 participants