ECOdyagnostics/operations.py
def _matching_pos(self, da, pos, skip=None):
        """
        Checks if the given data is on the indicated position

        :param da:      data variable or vector to test
        :param pos:     position to test for

        :return:        True, False or List(True/False, ...)
        """

        if type(da) == list:
            if skip != None:
                da = self._data_skip(da, skip)
            a_pos = self._get_dims(da)

            match = [any([expect == element for expect in self.points[pos]]) for element in a_pos]
            if all(match):
                return True
            else:
                return match  # raise Exception("""False elements %s do not match position %s""" % (match, pos))
        else:
            a_pos = self._get_dims(da)
            if a_pos in self.points[pos]:
                return True
            else:
                return False

        Checks if the given data is on the indicated position

        :param da:      data variable or vector to test
        :param pos:     position to test for

        :return:        True, False or List(True/False, ...)
        
Checks if the given data is on the indicated position
Checks if the given data is on the indicated position
def _matching_pos(self, da, pos, skip=None):
        if type(da) == list:
            if skip != None:
                da = self._data_skip(da, skip)
            a_pos = self._get_dims(da)
            match = [any([expect == element for expect in self.points[pos]]) for element in a_pos]
            if all(match):
                return True
            else:
                return match  
        else:
            a_pos = self._get_dims(da)
            if a_pos in self.points[pos]:
                return True
            else:
                return False
def _matching_pos ( self , da , pos , skip = None ) : if type ( da ) == list : if skip != None : da = self . _data_skip ( da , skip ) a_pos = self . _get_dims ( da ) match = [ any ( [ expect == element for expect in self . points [ pos ] ] ) for element in a_pos ] if all ( match ) : return True else : return match else : a_pos = self . _get_dims ( da ) if a_pos in self . points [ pos ] : return True else : return False
Checks if the given data is on the indicated position
Checks if the given data is on the indicated position
"""
        Checks if the given data is on the indicated position

        :param da:      data variable or vector to test
        :param pos:     position to test for

        :return:        True, False or List(True/False, ...)
        """ # raise Exception("""False elements %s do not match position %s""" % (match, pos))
True, False or List(True/False, ...)
True False or List ( True / False ... )
self
da
data variable or vector to test
data variable or vector to test
pos
position to test for
position to test for
skip