<commit_before>import bohrium as np
from numpytest import numpytest

class test_matmul(numpytest):
    def init(self):
        self.config['maxerror'] = 0.00001
        for t in ['np.float32','np.float64','np.int64']:
            maxdim = 6
            for m in range(1,maxdim+1):
                for n in range(1,maxdim+1):
                    for k in range(1,maxdim+1):
                        a = {}
                        cmd  = "a[0] = self.array((%d,%d),%s);"%(m,k,t)
                        cmd += "a[1] = self.array((%d,%d),%s);"%(k,n,t)
                        exec cmd
                        yield (a,cmd)

    def test_matmul(self,a):
        cmd = "res = np.matmul(a[0],a[1])"
        exec cmd
        return (res, cmd)

    def test_dot(self,a):
        cmd = "res = np.dot(a[0],a[1], no_matmul=True)"
        exec cmd
        return (res, cmd)<commit_msg>bhpy: Added test for matrix multiplication for complex numbers<commit_after>import bohrium as np
from numpytest import numpytest

class test_matmul(numpytest):
    def init(self):
        self.config['maxerror'] = 0.00001
        for t in ['np.float32','np.float64','np.int64','np.complex64','np.complex128']:
            maxdim = 6
            for m in range(1,maxdim+1):
                for n in range(1,maxdim+1):
                    for k in range(1,maxdim+1):
                        a = {}
                        cmd  = "a[0] = self.array((%d,%d),%s);"%(m,k,t)
                        cmd += "a[1] = self.array((%d,%d),%s);"%(k,n,t)
                        exec cmd
                        yield (a,cmd)

    def test_matmul(self,a):
        cmd = "res = np.matmul(a[0],a[1])"
        exec cmd
        return (res, cmd)

    def test_dot(self,a):
        cmd = "res = np.dot(a[0],a[1], no_matmul=True)"
        exec cmd
        return (res, cmd)
{'fraction_non_alphanumeric': 0.15515350877192982, 'fraction_numerical': 0.030153508771929825, 'mean_word_length': 1.6108726752503577, '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': '4480407', 'n_tokens_mistral': 656, 'n_tokens_neox': 619, 'n_words': 135}