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

Broadcasts over StepRange of Date/DateTime materialize to vectors #53869

Open
artemsolod opened this issue Mar 26, 2024 · 0 comments
Open

Broadcasts over StepRange of Date/DateTime materialize to vectors #53869

artemsolod opened this issue Mar 26, 2024 · 0 comments

Comments

@artemsolod
Copy link

I believe datetime arithmetic broadcasts over ranges of Date/DateTime can avoid being materialized to vectors which is currently the case:

julia> using Dates
julia> (0:5:10) .+ 1 # no vector created
1:5:11
julia> (Date(2024, 1, 1):Day(1):Date(2024, 1, 2)) .+ Day(1) # StepRange{Date, Day}  yields Vector{Date}
2-element Vector{Date}:
 2024-01-02
 2024-01-03
julia> (DateTime(2024, 1, 1):Day(1):DateTime(2024, 1, 2)) .+ Second(1) # similarly for DateTime
2-element Vector{DateTime}:
 2024-01-01T00:00:01
 2024-01-02T00:00:01

julia installed with juliaup:

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
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

1 participant