(data)
return data
Transform ``data`` to a numpy ndarray. The parameter ``data`` may
        contain data in various formats, e.g. nested lists, sympy ``Matrix``,
        and so on.

        Examples
        ========

        >>> from sympy.tensor.tensor import _TensorDataLazyEvaluator
        >>> _TensorDataLazyEvaluator.parse_data([1, 3, -6, 12])
        [1 3 -6 12]

        >>> _TensorDataLazyEvaluator.parse_data([[1, 2], [4, 7]])
        [[1 2]
         [4 7]]
Transform ``data`` to a numpy ndarray. The parameter ``data`` may
        contain data in various formats, e.g. nested lists, sympy ``Matrix``,
        and so on.
Transform data to a numpy ndarray . The parameter data may contain data in various formats e . g . nested lists sympy Matrix and so on .
def parse_data(data):
        """
        Transform ``data`` to a numpy ndarray. The parameter ``data`` may
        contain data in various formats, e.g. nested lists, sympy ``Matrix``,
        and so on.

        Examples
        ========

        >>> from sympy.tensor.tensor import _TensorDataLazyEvaluator
        >>> _TensorDataLazyEvaluator.parse_data([1, 3, -6, 12])
        [1 3 -6 12]

        >>> _TensorDataLazyEvaluator.parse_data([[1, 2], [4, 7]])
        [[1 2]
         [4 7]]
        """
        numpy = import_module('numpy')

        if (numpy is not None) and (not isinstance(data, numpy.ndarray)):
            if len(data) == 2 and hasattr(data[0], '__call__'):

                def fromfunction_sympify(*x):
                    return sympify(data[0](*x))

                data = numpy.fromfunction(fromfunction_sympify, data[1])
            else:
                vsympify = numpy.vectorize(sympify)
                data = vsympify(numpy.array(data))
        return data
def parse_data ( data ) : numpy = import_module ( 'numpy' ) if ( numpy is not None ) and ( not isinstance ( data , numpy . ndarray ) ) : if len ( data ) == 2 and hasattr ( data [ 0 ] , '__call__' ) : def fromfunction_sympify ( * x ) : return sympify ( data [ 0 ] ( * x ) ) data = numpy . fromfunction ( fromfunction_sympify , data [ 1 ] ) else : vsympify = numpy . vectorize ( sympify ) data = vsympify ( numpy . array ( data ) ) return data