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

# + [markdown] id="view-in-github" colab_type="text"
# [View in Colaboratory](https://colab.research.google.com/github/partha1189/ml/blob/master/numpy1.ipynb)

# + id="_IO6n9lCmThX" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="bed98786-272e-4e1a-9c30-714e998a6b6f"
my_list = [1,2,3,4]
import numpy as np
arr = np.array(my_list)
print(arr)

# + id="B24w604fnijP" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 1054} outputId="86d28906-e310-4d18-ce9c-8806c5a8e4f6"
help(np.arange)


# + id="SCJ_pt9Km2Hb" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="8443bf3a-ed96-464f-d92d-8369abfe6f25"
np.arange(4,13,2)

# + id="wNkcLeCCoShz" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 85} outputId="57b1b65a-f897-48c3-fb99-cd74fa41f172"
np.zeros((4,3))

# + id="ImYWGVE_oZiq" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 51} outputId="ce0247ed-61bb-4f97-ab38-4ea0dcf97e6b"
np.linspace(0,5,10)

# + id="k-y7AJt0owhj" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 85} outputId="63f28226-7c90-4c34-f838-9d131ed5fbac"
np.eye(4)

# + id="smYaeUDOo_Yy" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 51} outputId="f2aca9d5-edd6-47aa-fa38-2aadd1749dec"
np.random.rand(2,2)

# + id="FEEZ3dTTpemK" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="0ac21710-5ca2-4ac2-8cb0-d31e7a3d272a"
np.random.randn(5)

# + id="-jK20fC7pkJy" colab_type="code" colab={}
arr1 = np.arange(25)

# + id="_Rt1gbIxq97T" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 51} outputId="d35c78d9-bbc9-45db-bb80-2db49af2490e"
arr1

# + id="BZMxuSuDq_sb" colab_type="code" colab={}
ranarr = np.random.randint(0,50,10)

# + id="bQYRciU0rNV7" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="e1495026-5cfd-4dac-b0d8-f9720e9f6b14"
ranarr

# + [markdown] id="kp37hra5sEku" colab_type="text"
# RESHAPE
#

# + id="Dez1m_76rOqL" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 102} outputId="91576694-4633-47bb-bf11-0de7c817c34b"
arr1.reshape(5,5)

# + id="OiILkfkgraR1" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="686d1779-311a-4bdb-ad81-c2adaf30ee70"
ranarr.max()

# + id="LKHs3sDyr_cS" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="2634c0f2-4050-4471-ad8a-6473b47d7b66"
ranarr.argmax()

# + id="ggWWwQXKsCxD" colab_type="code" colab={}


StarcoderdataJupyterScriptsDedupFiltered