# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

# # Numpy Arrays - Aula 18

import numpy as np

my_list = [1,2,3]

arr = np.array(my_list)

arr

my_mat = [[1,2,3],[4,5,6],[7,8,9]]

np.array(my_mat)

np.arange(0,11,2)

np.zeros(3)

np.zeros((2,3))

np.ones(4)

np.linspace(0,5,10)

np.eye(5)

np.random.rand(5)

np.random.rand(5,5)

np.random.randn(2)

np.random.randint(1,100,10)

arr = np.arange(25)

arr

ranarr = np.random.randint(0,50,10)

ranarr

arr.reshape(5,5)

ranarr.max()

ranarr.min()

ranarr.argmin() #retorna o indice do menor valor do array

ranarr.argmax() #retorna o indice do maior valor do array

arr.shape

StarcoderdataJupyterScriptsDedupFiltered