def f_supports(self, data):
dtype = type(data)<EOL>if dtype is tuple or dtype is list:<EOL><INDENT>if len(data) == <NUM_LIT:0>:<EOL><INDENT>return False<EOL><DEDENT>old_type = None<EOL>for item in data:<EOL><INDENT>if not type(item) in pypetconstants.PARAMETER_SUPPORTED_DATA:<EOL><INDENT>return False<EOL><DEDENT>if not old_type is None and old_type != type(item):<EOL><INDENT>return False<EOL><DEDENT>old_type = type(item)<EOL><DEDENT>return True<EOL><DEDENT>elif dtype is np.ndarray or dtype is np.matrix:<EOL><INDENT>if data.size == <NUM_LIT:0>:<EOL><INDENT>return False <EOL><DEDENT>dtype = data.dtype<EOL>if np.issubdtype(dtype, np.str):<EOL><INDENT>dtype = np.str<EOL><DEDENT><DEDENT>return dtype in pypetconstants.PARAMETER_SUPPORTED_DATA<EOL>
Checks if input data is supported by the parameter.