(self, data_list, tensmul_list)
return functools.reduce(data_mul, zip(data_list, tensmul_list))
Given a ``data_list``, list of ``ndarray``'s and a ``tensmul_list``,
        list of ``TensMul`` instances, compute the resulting ``ndarray``,
        after tensor products and contractions.
Given a ``data_list``, list of ``ndarray``'s and a ``tensmul_list``,
        list of ``TensMul`` instances, compute the resulting ``ndarray``,
        after tensor products and contractions.
Given a data_list list of ndarray s and a tensmul_list list of TensMul instances compute the resulting ndarray after tensor products and contractions .
def data_product_tensors(self, data_list, tensmul_list):
        """
        Given a ``data_list``, list of ``ndarray``'s and a ``tensmul_list``,
        list of ``TensMul`` instances, compute the resulting ``ndarray``,
        after tensor products and contractions.
        """
        def data_mul(f, g):
            """
            Multiplies two ``ndarray`` objects, it first calls ``TIDS.mul``,
            then checks which indices have been contracted, and finally
            contraction operation on data, according to the contracted indices.
            """
            data1, tensmul1 = f
            data2, tensmul2 = g
            components, free, dum = TIDS.mul(tensmul1, tensmul2)
            data = _TensorDataLazyEvaluator._contract_ndarray(tensmul1.free, tensmul2.free, data1, data2)
            # TODO: do this more efficiently... maybe by just passing an index list
            # to .data_product_tensor(...)
            return data, TensMul.from_TIDS(S.One, TIDS(components, free, dum))

        return functools.reduce(data_mul, zip(data_list, tensmul_list))
def data_product_tensors ( self , data_list , tensmul_list ) : def data_mul ( f , g ) : """
            Multiplies two ``ndarray`` objects, it first calls ``TIDS.mul``,
            then checks which indices have been contracted, and finally
            contraction operation on data, according to the contracted indices.
            """ data1 , tensmul1 = f data2 , tensmul2 = g components , free , dum = TIDS . mul ( tensmul1 , tensmul2 ) data = _TensorDataLazyEvaluator . _contract_ndarray ( tensmul1 . free , tensmul2 . free , data1 , data2 ) # TODO: do this more efficiently... maybe by just passing an index list # to .data_product_tensor(...) return data , TensMul . from_TIDS ( S . One , TIDS ( components , free , dum ) ) return functools . reduce ( data_mul , zip ( data_list , tensmul_list ) )