Skip to content

Commit

Permalink
Merge pull request #213 from sparks-baird/sgbaird-patch-5
Browse files Browse the repository at this point in the history
try iterating through 3d matrix
  • Loading branch information
sgbaird committed Jul 1, 2023
2 parents 04841cf + 993035c commit 3c802a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xtal2png/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ def structures_to_arrays(
raise ValueError(
f"Expected square matrix in last two dimensions, received {d.shape}" # noqa: E501
)
d[np.tril_indices(d.shape[1])] = 0.0
for sq in d:
sq[np.tril_indices(d.shape[1])] = 0.0
else:
data[id_data == id_mapper[mask_type]] = 0.0

Expand Down

0 comments on commit 3c802a7

Please sign in to comment.