<commit_before>from __future__ import print_function, division

from sympy.core import Basic
from sympy.matrices.expressions.transpose import transpose
from sympy.matrices.expressions.matexpr import MatrixExpr


class DotProduct(MatrixExpr):
    """
        Dot Product of vector matrices
    """

    def __new__(cls, arg1, arg2):
        if not arg1.is_Matrix:
            raise TypeError("Argument 1 of DotProduct is not a matrix" % str(arg1))
        if not arg2.is_Matrix:
            raise TypeError("Argument 2 of DotProduct is not a matrix" % str(arg2))
        if not (1 in arg1.shape):
            raise TypeError("Argument 1 of DotProduct is not a vector" % str(arg1))
        if not (1 in arg2.shape):
            raise TypeError("Argument 2 of DotProduct is not a vector" % str(arg1))

        if arg1.shape != arg2.shape:
            raise TypeError("Input to Dot Product, %s and %s, are not of same dimensions" % (str(arg1), str(arg2)))

        return Basic.__new__(cls, arg1, arg2)

    def doit(self, expand=False):
        try:<commit_msg>sympify the input to DotProduct<commit_after>from __future__ import print_function, division

from sympy.core import Basic
from sympy.core.sympify import _sympify
from sympy.matrices.expressions.transpose import transpose
from sympy.matrices.expressions.matexpr import MatrixExpr


class DotProduct(MatrixExpr):
    """
        Dot Product of vector matrices
    """

    def __new__(cls, arg1, arg2):
        arg1, arg2 = _sympify((arg1, arg2))

        if not arg1.is_Matrix:
            raise TypeError("Argument 1 of DotProduct is not a matrix" % str(arg1))
        if not arg2.is_Matrix:
            raise TypeError("Argument 2 of DotProduct is not a matrix" % str(arg2))
        if not (1 in arg1.shape):
            raise TypeError("Argument 1 of DotProduct is not a vector" % str(arg1))
        if not (1 in arg2.shape):
            raise TypeError("Argument 2 of DotProduct is not a vector" % str(arg1))

        if arg1.shape != arg2.shape:
            raise TypeError("Input to Dot Product, %s and %s, are not of same dimensions" % (str(arg1), str(arg2)))

        return Basic.__new__(cls, arg1, arg2)

    def doit(self, expand=False):
        try:
{'fraction_non_alphanumeric': 0.0914826498422713, 'fraction_numerical': 0.021631365479945923, 'mean_word_length': 2.820998278829604, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6875442', 'n_tokens_mistral': 692, 'n_tokens_neox': 657, 'n_words': 231}