<jupyter_start><jupyter_text><jupyter_code>import numpy as np
A = np.array ([4,3])
B = np.array ([2,-5])
print ('Vector A is',A)
print ('Vector B is',B)
ball1 = np.array ([1,2,3])
ball2 = np.array ([0,1,-1])

pool = np.array ([ball1,ball2])
print(pool.shape)
print(pool.size)
print(pool.ndim)
R = A+B
print(R)<jupyter_output>[ 6 -2]<jupyter_text>Vector Addition<jupyter_code>R = np.add(A,B)
R<jupyter_output><empty_output><jupyter_text>Vector Subtraction<jupyter_code>R = np.subtract(A,B)
R<jupyter_output><empty_output><jupyter_text>Vector Scaling<jupyter_code>A = np.array ([1,5,8,9])
S = 5*A
print(S)
S = np.multiply(5,A)
print(S)<jupyter_output>[ 5 25 40 45]<jupyter_text>Vector Cross Product<jupyter_code>#initialize arrays
A = np.array([2,7])
B = np.array([1,7])

#compute cross product
output = np.cross(A,B)
print(output)
output = np.dot(A,B) #compute the dot product of A and B
print(output)<jupyter_output>51
{'fraction_non_alphanumeric': 0.1786492374727669, 'fraction_numerical': 0.03812636165577342, 'mean_word_length': 7.06140350877193, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '173880', 'license': 'Apache-2.0', 'n_tokens_mistral': 430, 'n_tokens_neox': 407, 'n_words': 78, 'path': 'Python_Exercise_2.ipynb', 'repo_name': 'MichaelOblego/Linear-Algebra-58020', 'size': '918'}