adding a check for the ndarray data type

This commit is contained in:
Антон Скалкин 2024-08-14 11:55:54 +04:00
parent 3ec1b4c5ce
commit ccc0196f56

View File

@ -47,7 +47,7 @@ class Partitioner(object):
data = kwargs.get('data',[None]) data = kwargs.get('data',[None])
if len(data.shape) > 1: if isinstance(data, np.ndarray) and len(data.shape) > 1:
warnings.warn(f"An ndarray of dimension greater than 1 is used. shape.len(): {len(data.shape)}") warnings.warn(f"An ndarray of dimension greater than 1 is used. shape.len(): {len(data.shape)}")
if self.indexer is not None: if self.indexer is not None: