@staticmethod<EOL><INDENT>def check_input(input):<DEDENT>
def to_jtensor(i):<EOL><INDENT>if isinstance(i, np.ndarray):<EOL><INDENT>return JTensor.from_ndarray(i)<EOL><DEDENT>elif isinstance(i, JTensor):<EOL><INDENT>return i<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>" % type(i))<EOL><DEDENT><DEDENT>if type(input) is list:<EOL><INDENT>if len(input) == <NUM_LIT:0>:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return list(map(lambda i: to_jtensor(i), input)), True<EOL><DEDENT>else:<EOL><INDENT>return [to_jtensor(input)], False<EOL><DEDENT>
:param input: ndarray or list of ndarray or JTensor or list of JTensor.
:return: (list of JTensor, isTable)