import numpy as np


# Dot product of scalars
scalar_product = np.dot(5, 4)
print(f"Dot Product of scalar values: {scalar_product}")

# Dot product of 1-Dimension arrays (vectors)
vector_a = np.array([1, 2, 3])
vector_b = np.array([4, 5, 6])
dot_product_vectors = np.dot(vector_a, vector_b)
print(f"Dot Product of vectors: {dot_product_vectors}")

# Dot product of 2-Dimension arrays (matrix multiplication)
matrix_a = np.array([[1, 2],
                     [3, 4],
                     [11, 12]])
matrix_b = np.array([[5, 6, 9],
                     [7, 8, 10]])

# The number of rows of the first matrix must equeal the number of columns of the 2nd
matrix_product = np.dot(matrix_a, matrix_b)
print(f"Dot Product of matrices:\n{matrix_product}")

# Create an object with copy

arr = np.array([1, 2, 3, 4, 5])
x = arr.copy()
arr[0] = 42

print(arr)
print(x)

print('**********')


arr = np.array([1, 2, 3, 4, 5])
arr1 = np.random.permutation(arr)

print(arr)
print(arr1)