From e1f72797ea7aea41b12a6fe92c73f92df91b1293 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 8 Aug 2024 11:59:14 +0400 Subject: [PATCH] Warning: An ndarray of dimension greater than 1 is used --- pyFTS/partitioners/partitioner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyFTS/partitioners/partitioner.py b/pyFTS/partitioners/partitioner.py index 165b767..14eb4a8 100644 --- a/pyFTS/partitioners/partitioner.py +++ b/pyFTS/partitioners/partitioner.py @@ -1,6 +1,7 @@ from pyFTS.common import FuzzySet, Membership import numpy as np from scipy.spatial import KDTree +import warnings class Partitioner(object): @@ -45,6 +46,9 @@ class Partitioner(object): if kwargs.get('preprocess',True): data = kwargs.get('data',[None]) + + if 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: ndata = self.indexer.get_data(data)