Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/drop37' into drop37
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Jan 17, 2025
2 parents b446f7a + 5d7996e commit 53aba99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dpdata/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ class Errors(ErrorsBase):
SYSTEM_TYPE = LabeledSystem

@property
@lru_cache()
@lru_cache
def e_errors(self) -> np.ndarray:
"""Energy errors."""
assert isinstance(self.system_1, self.SYSTEM_TYPE)
assert isinstance(self.system_2, self.SYSTEM_TYPE)
return self.system_1["energies"] - self.system_2["energies"]

@property
@lru_cache()
@lru_cache
def f_errors(self) -> np.ndarray:
"""Force errors."""
assert isinstance(self.system_1, self.SYSTEM_TYPE)
Expand Down Expand Up @@ -153,7 +153,7 @@ class MultiErrors(ErrorsBase):
SYSTEM_TYPE = MultiSystems

@property
@lru_cache()
@lru_cache
def e_errors(self) -> np.ndarray:
"""Energy errors."""
assert isinstance(self.system_1, self.SYSTEM_TYPE)
Expand All @@ -166,7 +166,7 @@ def e_errors(self) -> np.ndarray:
return np.concatenate(errors)

@property
@lru_cache()
@lru_cache
def f_errors(self) -> np.ndarray:
"""Force errors."""
assert isinstance(self.system_1, self.SYSTEM_TYPE)
Expand Down

0 comments on commit 53aba99

Please sign in to comment.