<jupyter_start><jupyter_text>[View in Colaboratory](https://colab.research.google.com/github/CC-MNNIT/2018-19-Classes/blob/master/MachineLearning/2018_08_22_Logical-Rhythm-2/difference.ipynb)<jupyter_code>import numpy as np
import time

a = np.random.rand(10000000)
b = np.random.rand(10000000)

print(a.shape,b.shape)
c = 0
tic = time.time()
for i in range(10000000):
	c += a[i]*b[i]
toc = time.time()

print("Loop :",str(toc-tic))
tic = time.time()
c = np.dot(a,b)
toc = time.time()

print("Vectorised :"+str(toc-tic))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18, 'fraction_numerical': 0.07272727272727272, 'mean_word_length': 5.802469135802469, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '174444', 'license': 'MIT', 'n_tokens_mistral': 270, 'n_tokens_neox': 227, 'n_words': 35, 'path': 'MachineLearning/2018_08_22_Logical-Rhythm-2/difference.ipynb', 'repo_name': 'CC-MNNIT/classes', 'size': '550'}