Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Apr 11, 2022
1 parent b697abb commit 6b65d79
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 188 deletions.
2 changes: 1 addition & 1 deletion cactice/fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def read_grids_csv(
# update the grid
grid[i, j] = cls

# save by name and cast values from float (numpy default) to int
# cast to int and save by name
grids[str(name)] = grid.astype(int)

return grids
2 changes: 1 addition & 1 deletion cactice/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def plot_grid(
values = list(set(np.ravel(grid)))
labels = np.vectorize(lambda x: str(x) if x != 0 else '')(grid)
ax = sns.heatmap(
grid,
np.vectorize(lambda s: hash(s))(grid),
square=True,
cbar=False,
annot=labels,
Expand Down
Loading

0 comments on commit 6b65d79

Please sign in to comment.