From ccc0196f56ed7f962c3be75e21435ca919eab43f Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 14 Aug 2024 11:55:54 +0400 Subject: [PATCH] adding a check for the ndarray data type --- pyFTS/partitioners/partitioner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFTS/partitioners/partitioner.py b/pyFTS/partitioners/partitioner.py index 14eb4a8..aef4172 100644 --- a/pyFTS/partitioners/partitioner.py +++ b/pyFTS/partitioners/partitioner.py @@ -47,7 +47,7 @@ class Partitioner(object): 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)}") if self.indexer is not None: