Skip to content

Commit 1dd1599

Browse files
committed
added 'check' in matching
1 parent ad97362 commit 1dd1599

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pyat/at/latticetools/matching.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def fun(vals):
3636
bounds = np.array([var.bounds for var in variables])
3737

3838
constraints.evaluate(ring, initial=True, dp=dp, dct=dct, df=df)
39+
constraints.check()
3940
ntargets = constraints.flat_values.size
4041

4142
if method is None:

pyat/at/latticetools/observables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def check(self):
527527
ok = super().check()
528528
shp = self._shape
529529
if ok and shp and shp[0] <= 0:
530-
raise AtError(f"{self.name}: No location selected in the lattice.")
530+
raise AtError(f"Observable {self.name!r}: No location selected in the lattice.")
531531
return ok
532532

533533
def _all_lines(self):

0 commit comments

Comments
 (0)