# # Numpy (nampi)
# # praca na macierzach (matrix) - (listy wielowymiarowe) - (listy w listach)
# #funkcje matematyczne
# #SZYBKOŚĆ - Bo wykorzystuje listy z C - C++

import numpy as np

# # my_list = [1, "apple", 3.14, [5,6]]
# # my_array = np.array([1, 2, 3])



# def print_array():
#     arr = np.array([[-1,2,-3], [4,5,6], [7,8,9]])
#     print(f"Tablica \n{arr}")
#     print(f"Pierwszy element tablicy: \n {arr[0]}")
#     print(f"Pierwszy zagniezdzony element tablicy: \n {arr[0][0]}")
#     print(f"Typ obiektu tablicy: {type(arr)}")
#     print(f"Kształt tablicy: {arr.shape}")
#     return arr

# arr = print_array()

# def shapeshfter(arr):
#     print("Kształt tablicy 9x1")
#     print(arr.reshape(9,1))
#     print("Kształt tablicy 1x9")
#     print(arr.reshape(1,9))
#     print("Kształt tablicy 3x3")
#     print(arr.reshape(3,3))
#     print("Kształt tablicy ?x9")
#     print(arr.reshape(-1,9))
#     print("Kształt tablicy 3x?")
#     print(arr.reshape(3,-1))
#     newarr = np.array_split(arr.reshape(1,9), 3)
#     print(newarr)

# shapeshfter(arr)
    
    

# def data_forma():
#     try: 
#         arr = np.array([[1.1, 2.2, 3.3], ["kot", 12, "ola"], ["a", "h", "5"]])
#         print(arr)
#         print(type(arr))

#     except Exception as e:
#         print(e)


#     arr = np.array([[1.1,2.2,3.3] , [4.4, 5.5, 6.6] , [7.7,8.8,9.9]], dtype="U")
#     print(arr)
#     print(type(arr))
#     arr = np.array([[1.1,2.2,3.3] , [4.4, 5.5, 6.6] , [7.7,8.8,9.9]], dtype="i")
#     print(arr)
#     print(type(arr))
#     arr = np.array([[1.1,2.2,3.3] , [4.4, 5.5, 6.6] , [7.7,8.8,9.9]], dtype="f")
#     print(arr)
#     print(type(arr))

# data_forma()


# def array_sorter():
#      arr = np.array([[-1,2,-3], [4,5,6], [7,8,9]])
#      print(f"Tablica \n{arr}")
#      print(f"Tablica po sortowaniu \n {np.sort(arr)}")

# array_sorter()

from numpy import random

# def generate_random_numbers():
#     for i in range (10):
#         print(random.randint(100))
#     for i in range(10):
#         print(random.rand())

# generate_random_numbers()


# def pick_random_numbers():
#     print(random.rand(3, 5))
#     print(random.choice([3, 5, 7, 9]))
#     print(random.choice([3, 5, 7, 9], size=(3, 5)))
#     x = random.choice([3, 5, 7, 9], size=(100), p=[0.1, 0.3, 0.6, 0])
#     print(x)
# pick_random_numbers()

def shuffle_array():
    arr = np.array([1, 2, 3, 4, 5])
    print(f"Przetasowana: {random.shuffle(arr)}")
    print(arr)

shuffle_array()



