Skip to content

Commit

Permalink
Added shape attr check in validation (#1014)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Pivovar <apivovar@Aleksandrs-MacBook-Pro.local>
  • Loading branch information
PivovarA and Aleksandr Pivovar authored Aug 23, 2022
1 parent e7ddd1f commit a256134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onedal/datatypes/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _num_samples(x):
)
# Check that shape is returning an integer or default to len
# Dask dataframes may not return numeric shape[0] value
if isinstance(x.shape[0], Integral):
if hasattr(x, "shape") and isinstance(x.shape[0], Integral):
return x.shape[0]

try:
Expand Down

0 comments on commit a256134

Please sign in to comment.