-
Notifications
You must be signed in to change notification settings - Fork 125
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
Feature/tutorials #609
Merged
Merged
Feature/tutorials #609
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix 2 typos in 2 tutorials. 1) climada_engine_CostBenefit.jpynb in the comment before cell 14. Different --> Difference 2) climada_entity_DiscRates.jpynb in the first paragraph before cell 1. const-benefit --> cost-benefit
This commit fix a typo in the first cell of the tutorial climada_entity_Impact_FuncSet. exposurethe --> exposure
This commit fix a typo in the markdown cell before cell 4 of the tutorial climada_entity_Impact_FuncSet. forllowing --> following
This commit fix 2 typos in the tutorial climada_entity_Impact_FuncSet. 1) To generate the this --> To generate this 2) ImpactFunctionSet --> `ImpactFuncSet` (just for consistancy with the other headers in the tutorial)
This commit fix typos in the tutorial climada_entity_Impact.jpynb 1) Typo 1: To computation -> The computation 2) Typo 2: `Exposures'` -> `Exposures` 3) Typo 3: value the corresponding -> values of the corresponding
Fix bug in the tutorial climada_entity_Impact_FuncSet. Unfortunately, not all the outputs could be reverted after the changes were saved. Therefore, a lot of outputs have changed (plots mainly). The arguments that define an impact function where not specified with keywords when Impct.Func were called to initialize an arbitrarly imp_fun, additionaly there where in a different order in respect to the __init__ function of ImpactFunc. Therefore, when calling Impact.Func.mdd, Impact.Func.paa and Impact.Func.intensity, the following wrong outputs were produced. imp_fun.intensity was instanciated as intensity units imp_fun.intensity_unit was instanciated as mdd imp_fun.name was instanciated as paa imp_fun.haz_type was instanciated as id imp_fun.paa was instanciated as intesity Therefore when u_check was called to check that the size of the intensity is equal to the size of mdd and paa, it was not comparing the actual real intesities, mdd and paa, but the above values. By specifyng the arguments as in the next paragraph, u_check, situtated in: climada/entity/impact_funcs/base.py, compare that the size of the real intensity is equal to the size of the real mdd and paa. Specification of the arguments with keyword: imp_fun = ImpactFunc(id=id, name=name, intensity_unit=intensity_unit, haz_type=haz_type, intensity=intensity, mdd=mdd, paa=paa)
This reverts commit 9ae72a4. The outputs changed so it was impossible to read just the changes that I made. A new commit where only the changes that I made are visible will be made.
Fix bug in the tutorial climada_entity_Impact_FuncSet. The arguments that define an impact function where not specified with keywords when Impct.Func were called to initialize an arbitrarly imp_fun, additionaly there where in a different order in respect to the __init__ function of ImpactFunc. Therefore, when calling Impact.Func.mdd, Impact.Func.paa and Impact.Func.intensity, the following wrong outputs were produced. imp_fun.intensity was instanciated as intensity units imp_fun.intensity_unit was instanciated as mdd imp_fun.name was instanciated as paa imp_fun.haz_type was instanciated as id imp_fun.paa was instanciated as intesity Therefore when u_check was called to check that the size of the intensity is equal to the size of mdd and paa, it was not comparing the actual real intesities, mdd and paa, but the above values. By specifyng the arguments as in the next paragraph, u_check, situtated in: climada/entity/impact_funcs/base.py, compare that the size of the real intensity is equal to the size of the real mdd and paa. Specification of the arguments with keyword: imp_fun = ImpactFunc(id=id, name=name, intensity_unit=intensity_unit, haz_type=haz_type, intensity=intensity, mdd=mdd, paa=paa)
peanutfun
approved these changes
Jan 6, 2023
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.
Great, thank you! I took the liberty of running a formatter over the two code cells you changed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #
2 typos in 2 tutorials.
climada_engine_CostBenefit.jpynb in the comment before cell 14.
different --> difference
climada_entity_DiscRates.jpynb in the first paragraph before cell 1.
const-benefit --> cost-benefit
PR Author Checklist
develop
)PR Reviewer Checklist