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

dawn4py utils.py issues #1104

Open
BenWeber42 opened this issue Feb 8, 2021 · 0 comments
Open

dawn4py utils.py issues #1104

BenWeber42 opened this issue Feb 8, 2021 · 0 comments

Comments

@BenWeber42
Copy link
Contributor

I think make_magic_num_interval should be added to __all__ : https://github.com/MeteoSwiss-APN/dawn/blob/master/dawn/src/dawn4py/serialization/utils.py
Also, python doesn't have overloading, so this is a bug:

def make_vertical_region_decl_stmt(vertical_region: VerticalRegion) -> VerticalRegionDeclStmt:
""" Create a VerticalRegionDeclStmt
:param vertical_region: Vertical region.
"""
stmt = VerticalRegionDeclStmt()
stmt.vertical_region.CopyFrom(vertical_region)
return stmt
def make_vertical_region_decl_stmt(
ast: AST,
interval: Interval,
loop_order: VerticalRegion.LoopOrder,
IRange: Interval = None,
JRange: Interval = None,
) -> VerticalRegionDeclStmt:
""" Create a VerticalRegionDeclStmt
:param vertical_region: Vertical region.
"""
stmt = VerticalRegionDeclStmt()
stmt.vertical_region.CopyFrom(make_vertical_region(
ast, interval, loop_order, IRange, JRange))
return stmt

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