Skip to content

Commit

Permalink
Handle defective patterns (None)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha Beniamine committed Jan 15, 2025
1 parent dd0a7c2 commit 3b7bdcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qumin/representations/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ def find_cellpair_applicable(self, pair):

def applicable(form):
""" Return a tuple of all applicable patterns for a given form"""
return tuple((p for p in available_patterns if p.applicable(form, cell_x)))
return tuple((p for p in available_patterns if p is not None and p.applicable(form, cell_x)))

has_pat = df['pattern'].notna()
return (pair, df.loc[has_pat, "form_x"].apply(applicable))
Expand Down

0 comments on commit 3b7bdcd

Please sign in to comment.