<jupyter_start><jupyter_text>Import the relevant libraries<jupyter_code>import numpy as np<jupyter_output><empty_output><jupyter_text>Declaring scalars, vectors, and matrices  Scalars<jupyter_code>s = 5
s<jupyter_output><empty_output><jupyter_text>Vectors<jupyter_code>v = np.array([5,-2,4])
v<jupyter_output><empty_output><jupyter_text>Matrices<jupyter_code>m = np.array([[5,12,6],[-3,0,14]])
m<jupyter_output><empty_output><jupyter_text>Data types<jupyter_code>type(s)
type(v)
type(m)
s_array = np.array([5])
type(s_array)<jupyter_output><empty_output><jupyter_text>Data shapes<jupyter_code>m.shape
v.shape
s.shape
s_array.shape<jupyter_output><empty_output><jupyter_text>Creating a column vector<jupyter_code>v.reshape(1,3)
v.reshape(3,1)
m+s
m+s_array
v+s
v
v+s_array
m+v<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1453416149068323, 'fraction_numerical': 0.02111801242236025, 'mean_word_length': 13.925925925925926, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '280972', 'license': 'Apache-2.0', 'n_tokens_mistral': 370, 'n_tokens_neox': 365, 'n_words': 38, 'path': '06 - Mathematics/1_Introduction to Linear Algebra/4_Scalars, Vectors, and Matrices as Python Arrays (5:09)/Scalars, Vectors, and Matrices.ipynb', 'repo_name': 'olayinka04/365-data-science-courses', 'size': '805'}