Skip to content

Commit

Permalink
Made modifications based on recent updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SindhuraParuchuri committed Jan 25, 2024
1 parent 5fe4c45 commit 37c0f93
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 94 deletions.
70 changes: 27 additions & 43 deletions doc/devlog/example_local_birds.ipynb

Large diffs are not rendered by default.

42 changes: 15 additions & 27 deletions doc/devlog/example_long_birds.ipynb

Large diffs are not rendered by default.

43 changes: 21 additions & 22 deletions doc/devlog/example_mosquito.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions epymorph/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ def bottom_locations(ctx: InitContext, attribute: str, num_locations: int, seed_
return indexed_locations(ctx, selection, seed_size)

def bird_movement_initializer(ctx: InitContext)->NDArray[SimDType]:
result = ctx.geo['bird_population'].reshape((ctx.nodes, ctx.compartments)) # type: ignore
result = ctx.geo['bird_population'].reshape((ctx.dim.nodes, ctx.dim.compartments)) # type: ignore
return result.astype(SimDType)

def mosquito_movement_initializer(ctx: InitContext)->NDArray[SimDType]:
result = ctx.geo['bird_population'].reshape((ctx.nodes, ctx.compartments)) # type: ignore
result = ctx.geo['bird_population'].reshape((ctx.dim.nodes, ctx.dim.compartments)) # type: ignore
return result.astype(SimDType)

DEFAULT_INITIALIZER = single_location
Expand Down

0 comments on commit 37c0f93

Please sign in to comment.