-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add copy function to TimeArray #352
Conversation
src/timearray.jl
Outdated
###### copy ############### | ||
|
||
copy(ta::TimeArray)::TimeArray = | ||
TimeArray(ta.timestamp, ta.values, ta.colnames, ta.meta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make it 4-space indented?
@@ -56,6 +56,11 @@ convert(::Type{TimeArray{Float64, 2}}, x::TimeArray{Bool, 2}) = | |||
convert(x::TimeArray{Bool, 1}) = convert(TimeArray{Float64, 1}, x::TimeArray{Bool, 1}) | |||
convert(x::TimeArray{Bool, 2}) = convert(TimeArray{Float64, 2}, x::TimeArray{Bool, 2}) | |||
|
|||
###### copy ############### | |||
|
|||
copy(ta::TimeArray)::TimeArray = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think our compiler is smart enough, and we do not need return type annotation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if it is redundant, I prefer to annotate types as much as possible. But I will adapt to the style you prefer. Would you prefer to remove the output type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm fine with current.
Thanks! |
The copy base function is necessary to use the Bootstrap package.
The Bootstrap package will also need some changes, but this paves the way to being able to use both packages together.