# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %% [markdown]
# # Import the relevant libraries

# %%
import numpy as np

# %% [markdown]
# # Declaring scalars, vectors, and matrices
# %% [markdown]
# ## Scalars

# %%
s = 5


# %%
s

# %% [markdown]
# ## Vectors

# %%
v = np.array([5,-2,4])


# %%
v

# %% [markdown]
# ## Matrices

# %%
m = np.array([[5,12,6],[-3,0,14]])


# %%
m

# %% [markdown]
# ## Data types

# %%
type(s)


# %%
type(v)


# %%
type(m)


# %%
s_array = np.array(5)


# %%
type(s_array)

# %% [markdown]
# ## Data shapes

# %%
m.shape


# %%
v.shape


# %%
s.shape


# %%
s_array.shape

# %% [markdown]
# ## Creating a column vector

# %%
v.reshape(1,3)


# %%
v.reshape(3,1)


# %%
m+s


# %%
m+s_array


# %%
v+s


# %%
v


# %%
v+s_array


# %%
m+v


# %%



1b483df4607761b84b507ed304359414d67c3dd1
<mask token>

<mask token>
s
<mask token>
v
<mask token>
m
type(s)
type(v)
type(m)
<mask token>
type(s_array)
m.shape
v.shape
s.shape
s_array.shape
v.reshape(1, 3)
v.reshape(3, 1)
m + s
m + s_array
v + s
v
v + s_array
m + v

<mask token>
s = 5
s
v = np.array([5, -2, 4])
v
m = np.array([[5, 12, 6], [-3, 0, 14]])
m
type(s)
type(v)
type(m)
s_array = np.array(5)
type(s_array)
m.shape
v.shape
s.shape
s_array.shape
v.reshape(1, 3)
v.reshape(3, 1)
m + s
m + s_array
v + s
v
v + s_array
m + v

import numpy as np
s = 5
s
v = np.array([5, -2, 4])
v
m = np.array([[5, 12, 6], [-3, 0, 14]])
m
type(s)
type(v)
type(m)
s_array = np.array(5)
type(s_array)
m.shape
v.shape
s.shape
s_array.shape
v.reshape(1, 3)
v.reshape(3, 1)
m + s
m + s_array
v + s
v
v + s_array
m + v

# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %% [markdown]
# # Import the relevant libraries

# %%
import numpy as np

# %% [markdown]
# # Declaring scalars, vectors, and matrices
# %% [markdown]
# ## Scalars

# %%
s = 5


# %%
s

# %% [markdown]
# ## Vectors

# %%
v = np.array([5,-2,4])


# %%
v

# %% [markdown]
# ## Matrices

# %%
m = np.array([[5,12,6],[-3,0,14]])


# %%
m

# %% [markdown]
# ## Data types

# %%
type(s)


# %%
type(v)


# %%
type(m)


# %%
s_array = np.array(5)


# %%
type(s_array)

# %% [markdown]
# ## Data shapes

# %%
m.shape


# %%
v.shape


# %%
s.shape


# %%
s_array.shape

# %% [markdown]
# ## Creating a column vector

# %%
v.reshape(1,3)


# %%
v.reshape(3,1)


# %%
m+s


# %%
m+s_array


# %%
v+s


# %%
v


# %%
v+s_array


# %%
m+v


# %%


