Skip to content

Commit

Permalink
Make the check work with the new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmart committed Sep 23, 2024
1 parent b41bf2b commit 267c321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tabmat/categorical_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ def cat(self):
"This property will be removed in the next major release.",
category=DeprecationWarning,
)
try:
if pd:
return pd.Categorical.from_codes(self.indices, categories=self.categories)
except NameError:
else:
raise ModuleNotFoundError(
"The `cat` property is provided for backward compatibility and "
"requires pandas to be installed."
Expand Down

0 comments on commit 267c321

Please sign in to comment.