Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 18, 2024
1 parent b25efde commit cae6577
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dpgen2/exploration/render/traj_render_lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def _load_one_model_devi(self, fname, model_devi):
dd = fname.get_data()
else:
dd = np.loadtxt(fname)
if len(np.shape(dd)) == 1: # In case model-devi.out is 1-dimensional # type: ignore
if (
len(np.shape(dd)) == 1

Check failure on line 67 in dpgen2/exploration/render/traj_render_lammps.py

View workflow job for this annotation

GitHub Actions / pyright

Argument of type "Unknown | NDArray[float64] | None" cannot be assigned to parameter "a" of type "ArrayLike" in function "shape" (reportGeneralTypeIssues)
): # In case model-devi.out is 1-dimensional # type: ignore
dd = dd.reshape((1, len(dd))) # type: ignore

Check warning on line 69 in dpgen2/exploration/render/traj_render_lammps.py

View check run for this annotation

Codecov / codecov/patch

dpgen2/exploration/render/traj_render_lammps.py#L69

Added line #L69 was not covered by tests

model_devi.add(DeviManager.MAX_DEVI_V, dd[:, 1]) # type: ignore
Expand Down

0 comments on commit cae6577

Please sign in to comment.