Skip to content

Commit

Permalink
finished fixing bug#315; ensured feature_names are not empty in PDELi…
Browse files Browse the repository at this point in the history
…brary to fix last example in notebook 1
  • Loading branch information
znicolaou committed Apr 25, 2023
1 parent f83bf20 commit 0af7426
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pysindy/feature_library/pde_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,11 @@ def derivative_string(multiindex):
feature_names = feature_names + derivative_feature_names

# Include mixed non-derivative + derivative terms
if self.include_interaction:
if (
self.include_interaction
and len(function_feature_names) > 0
and len(derivative_feature_names) > 0
):
feature_names = (
feature_names
+ np.char.add(
Expand Down

0 comments on commit 0af7426

Please sign in to comment.