-
Notifications
You must be signed in to change notification settings - Fork 6
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 method to display all DHW scenarios for the currently set RCP/SSP #914
Conversation
src/analysis/feature_set.jl
Outdated
""" | ||
function _filter_constants(scens::DataFrame)::DataFrame | ||
varying_cols = [] | ||
for (i, col) in enumerate(eachcol(scens)) |
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.
Is the loop here is more efficient than something like findall(dropdims(sum(diff(Matrix(scens);dims=1),dims=1),dims=1).==0.0)
?
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.
Adjusted to use a comprehension instead of mutating an existing vector.
I had to get something done quickly so what was there before was the easiest way without using too much brain power.
This should address your concern re efficiency while balancing for code readability.
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.
Looks good to me :)
As in title.
I've also taken the opportunity to flesh out the docstring for
ADRIA.viz.dhw_scenario(dom, some_id)
which was missing.