{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "c7327e82-fd82-4234-a5ec-2c94292c198f",
   "metadata": {},
   "source": [
    "## Numpy"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a19730c2-6384-4353-80d1-4df49846f9d6",
   "metadata": {},
   "source": [
    "__Ejercicio 1:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d0c1cfcc-7730-4612-9a49-23f3790b543f",
   "metadata": {},
   "source": [
    "Importar numpy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fdc297ee-bc0d-42b8-a1cb-c01e45fae36d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a70a8238-60ef-4383-b3da-4714c1074c85",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6abe2412-1096-42ef-ac26-97d52d483563",
   "metadata": {},
   "source": [
    "__Ejercicio 2:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d06d31a3-2aba-4262-ba57-bb8b5989bb0f",
   "metadata": {},
   "outputs": [],
   "source": [
    "lista= [31,28,29,19]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a280bead-9a9a-4605-8954-e47d37cac2a6",
   "metadata": {},
   "source": [
    "Crear una ndarray utilizando la lista anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2fc49c07-0660-44da-8fd0-c5f71fbf67d7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "a7f7692d-63e3-4688-bbda-9c5dc9340e0f",
   "metadata": {},
   "source": [
    "__Ejercicio 3:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4d0aa5ca-e154-4f9b-9b25-7c7f2695e06b",
   "metadata": {},
   "outputs": [],
   "source": [
    "lista_2d=[[2,3,4],\n",
    "          [3,4,5],\n",
    "          [3,4,5],\n",
    "          [3,4,5]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d7c21cc3-407d-44ef-82a9-82733f2bffee",
   "metadata": {},
   "source": [
    "Crear una ndarray utilizando la lista bidimensional anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3aa7c127-4943-45f2-a5a3-3e9ef4cc7589",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "ef3847b6-eda7-4fd1-b115-3c240a2413a7",
   "metadata": {},
   "source": [
    "__Ejercicio 4:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7ebe38ea-eef2-49d6-b15e-a9ecb2a52b2c",
   "metadata": {},
   "source": [
    "Utilizar la propiedad shape para obtener la forma del ndarray anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "15be0acf-6149-4104-a361-ac862e9e6620",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "4824638b-96e5-4754-be79-8c823f834420",
   "metadata": {},
   "source": [
    "Utilizar la propiedad ndim para obtener las dimensiones del ndarray anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6c2fad0b-cb86-439e-b4a7-7fd3edbba2c7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "1e434bf5-ec3f-4c86-8e41-09fe3eb736a0",
   "metadata": {},
   "source": [
    "Utilizar la propiedad dtype para obtener el tipo de los datos en el ndarray anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "69e66663-e400-4795-9f81-84978b1cad1f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "184283c0-3789-48fc-bac0-d7cdf275bec4",
   "metadata": {},
   "source": [
    "Utilizar la propiedad size para obtener la cantidad total de datos en el ndarray anterior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a22fd4c0-43b7-4bee-b34e-99d0599aee2d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "5dd95a43-7d3d-426a-9bd1-48e1bd3b2da9",
   "metadata": {},
   "source": [
    "__Ejercicio 5:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "761e91bc-f278-4380-ba5b-d05f9cbdec6f",
   "metadata": {},
   "source": [
    "Crear un ndarray utilizando la lista \"lista_2d\", el tipo de los datos debe ser \"int16\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "94b41715-3d42-427e-a3fd-240487b0ea90",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "67a2d007-ddec-41df-8bb2-df4a51420fae",
   "metadata": {},
   "source": [
    "__Ejercicio 6:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95aebac0-6ef3-45de-a8a8-be4d7cb71d7c",
   "metadata": {},
   "source": [
    "Utilizar la función np.zeros para crear un ndarray con la forma 3x2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d2997bc4-ae45-4b4a-aa36-7329dc32b33e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "61a92a21-f2ee-4b7d-bea8-24f7bec015c3",
   "metadata": {},
   "source": [
    "Utilizar la función np.ones para crear un ndarray con la forma 3x3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "87db7972-fda2-4858-a456-6670825c6479",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "b3956de0-7f1c-4424-9a95-f5c38f4ff01f",
   "metadata": {},
   "source": [
    "Utilizar la función np.empty para crear un ndarray con la forma 2x4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ea688cdb-6eca-43ed-9415-a11289356396",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "d97f5126-5e89-4e84-bff8-8ab2922ebccb",
   "metadata": {},
   "source": [
    "__Ejercicio 7:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9b4f9ead-3891-4b57-b174-b601dc0683bf",
   "metadata": {},
   "source": [
    "Crear un ndarray de 1 dimensión con los valores del 0 al 9 (Ej. [1,2,3,...])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8cdb9077-e8b1-4c35-ad3a-4ec715e79112",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "57be4fb9-0969-4a92-a278-387d7595c3fc",
   "metadata": {},
   "source": [
    "Crear un ndarray de 2 dimensión con la forma 2x5,los valores deben ser del 0 al 9 (Ej. [[0,1,2,3,4],[5,6,..]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "79a345a8-b779-415d-b22e-e87d75b1672f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "31da554b-5b01-4c72-a240-31daba880c19",
   "metadata": {},
   "source": [
    "__Ejercicio 8:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f5a7f25-48d2-4171-9b5f-3dd956e57e50",
   "metadata": {},
   "source": [
    "Utilizar np.arange para crear un ndarray con los valores del 10 al 20, deben ir de 2 en 2 (Ej. [10,12,..])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c05f65d7-55df-4bb3-862e-7eab91a3d3d9",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "a42828a6-38db-46fd-8fa8-301a8838c627",
   "metadata": {},
   "source": [
    "__Ejercicio 9:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fd702fb3-3cd9-45d6-8032-57bbec0a51b1",
   "metadata": {},
   "source": [
    "Utilizar np.linspace para crear un ndarray con los valores enteros entre el 10 al 20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "85cc30af-250f-4ab8-a7cf-eed247a0dea9",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "d04b6ccf-5d9b-4769-a3a2-d65d93e644d4",
   "metadata": {},
   "source": [
    "__Ejercicio 10:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a5624bd4-06c2-4959-8e10-d1b8e0227705",
   "metadata": {},
   "source": [
    "Utilizar np.linspace para crear un ndarray  con 100 números entre el 0 y 2$\\pi$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aa9439dc-b364-465c-b260-ca47fd9fcec4",
   "metadata": {},
   "outputs": [],
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "22b71ecd-a48f-47a5-8fb3-c53384a557b6",
   "metadata": {},
   "source": [
    "Utilizar np.sin y np.cos para obtener los valores de seno y coseno en los puntos del array anterior "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "691abc23-2c53-4e71-8feb-899e067166d9",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "bc933a1f-5f84-4e0e-bfa9-13d682e74779",
   "metadata": {},
   "source": [
    "Utilizar plt.plot para graficar un círculo con los datos de seno y coseno"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "67c506aa-ba33-4658-ab11-295539ffdad2",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "155bbcd6-88d5-4cdc-9a05-c50f26f5187f",
   "metadata": {},
   "source": [
    "__Ejercicio 11:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0b81a7c-aa51-4400-9527-130a5bbcc8d5",
   "metadata": {},
   "source": [
    "Utilizar plt.plot para graficar los valores de seno y coseno por separado"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6e91a06c-c9ec-4600-a220-1c3e75668def",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "8bd317ad-9cae-4dff-a928-726ebda177bf",
   "metadata": {},
   "source": [
    "__Ejercicio 12:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e3319954-862f-4bdf-998e-d5f24781a40d",
   "metadata": {},
   "outputs": [],
   "source": [
    "a= np.linspace(10,20,6)\n",
    "b= np.linspace(5,25,6)\n",
    "print(a,b)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "03a56414-a7b0-4dff-a351-11af200156ee",
   "metadata": {},
   "source": [
    "Sumar los valores de los ndarray \"a\" y \"b\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "98e5e936-d60c-4d71-a750-2f9a2f8d21bf",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "fc20ad08-c098-4593-8b9c-dbcd87937c56",
   "metadata": {},
   "source": [
    "Unir los ndarray \"a\" y \"b\", guardarlo en la variable c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eac3bddb-1e5e-4357-9bc6-61637c2c6d26",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "378dd0d9-1363-4dfb-ba87-674921eb979e",
   "metadata": {},
   "source": [
    "Ordenar los valores del ndarray c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5dc18067-228d-4596-b481-32f2bfd1c21e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "7b311d70-aedb-42c5-a1d6-690d0a9919b3",
   "metadata": {},
   "source": [
    "__Ejercicio 13:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4965dab5-9b59-40b7-8246-4cf089550b74",
   "metadata": {},
   "source": [
    "Utilizar rg.random para generar un ndarray de 1000 números aleatorios entre el 0 y 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "336bd3a7-b45d-4a1e-bcce-74910ec6b328",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b91eda2e-1ae1-44fe-845d-f38fa71da28e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "93474f2c-03ed-4c5e-8eaf-58503cf1476e",
   "metadata": {},
   "source": [
    "__Ejercicio 14:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ce6d972e-370e-4c20-aa5f-da7842f765a9",
   "metadata": {},
   "source": [
    "Utilizar rg.normal para generar 100000 valores aleatorios que sigan una distribución normal"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f6cd3814-1cf1-47cf-98be-2dac3bcd3573",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6aefe781-fce0-475e-b583-09642e942696",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "1159dfcb-d59b-48f4-89b6-a1b5778595a0",
   "metadata": {},
   "source": [
    "__Ejercicio 15:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "55d97f65-d5b4-4a8d-90c9-d6ef6759c209",
   "metadata": {},
   "source": [
    "Utilizar rg.integers para generar 2000 números aleatorios enteros entre el 0 y el 19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "545685a7-641e-412c-a0e4-568654ce2220",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "87b4f720-2e82-41ae-85e6-2ca3e70eeecd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8fd03ef3-875a-44ba-914c-26e57cd4dcba",
   "metadata": {},
   "outputs": [],
   "source": [
    "#np.unique(enteros, return_counts=True) Comprobar que los valores son muy similares"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3324d3f5-a77a-42c0-ba7e-25313e43bb58",
   "metadata": {},
   "source": [
    "__Ejercicio 16:__"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d907b4dc-301e-4b21-bde5-4dd96fdcd076",
   "metadata": {},
   "source": [
    "Utilizar rg.choice para elegir 10 números aleatorios SIN REPETIR entre el 0 y el 25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7ec02ffd-eef3-4e3e-b2e9-59450b94d3bd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "385775b3-86a0-4715-908b-dfa75dca95f2",
   "metadata": {},
   "source": [
    "__Ejercicio 17:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "76b0c5a0-5b28-48fe-9485-baad8cf663c6",
   "metadata": {},
   "outputs": [],
   "source": [
    "estadisticos = rg.integers(20,size=8)\n",
    "estadisticos"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "012b5e04-220e-433c-b0ec-b21aa9d326cf",
   "metadata": {},
   "source": [
    "Utilizar la función min() para obtener el valor mínimo en el ndarray \"estadisticos\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e4a38410-43ac-4c7c-92bd-c3d65c0b5432",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "117dddae-3654-43cf-9e8d-54e783a674cb",
   "metadata": {},
   "source": [
    "Utilizar la función max() para obtener el valor máximo en el ndarray \"estadisticos\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "abaf6bb5-c24d-4607-b7e2-f6fafde47d97",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "fd88688f-2bc0-4c5d-bcd2-af6fe9e99411",
   "metadata": {},
   "source": [
    "Utilizar la función mean() para obtener el valor promedio en el ndarray \"estadisticos\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3b38b3b3-2245-4731-af11-7e19474af1cc",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e0ef2fef-cad0-4579-a8ce-b298b42fb330",
   "metadata": {},
   "source": [
    "Utilizar la función std() para obtener el valor de la desviación estandar en el ndarray \"estadisticos\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "77c908c4-d007-4baa-801a-314aab7b2369",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "979aded7-3aa6-4248-b2f6-ea271c5f6e79",
   "metadata": {},
   "source": [
    "Utilizar la función sum() para obtener el valor al sumar todos los números en el ndarray \"estadisticos\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ee48bd78-1b9b-4c32-b270-62f6f20a1c63",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "b8a7f523-541e-4ffc-9090-f6a18f852ef2",
   "metadata": {},
   "source": [
    "__Ejercicio 18:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "acb73618-214c-4fcb-b022-1a97e618f4b1",
   "metadata": {},
   "outputs": [],
   "source": [
    "estadisticos_2d = rg.integers(20,size=(5,4))\n",
    "estadisticos_2d"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "88696800-dfdf-4b5f-bf3b-8412b1a84e19",
   "metadata": {},
   "source": [
    "Utilizar la función min() para obtener el valor mínimo de cada columna en el ndarray \"estadisticos_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fdc54d32-3db7-4e6c-a9ef-b87680bcc1fd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "7e18ef29-8d28-41ee-b42a-c5788b7179a5",
   "metadata": {},
   "source": [
    "Utilizar la función max() para obtener el valor mínimo de cada fila en el ndarray \"estadisticos_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "86f54bac-4399-46d6-8a11-866cab776aa0",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e1fa802b-7974-471d-a02a-7e17a6ab7ae4",
   "metadata": {},
   "source": [
    "__Ejercicio 19:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ae7128dd-fdb9-49e7-a68f-b89aa5e7eb6d",
   "metadata": {},
   "outputs": [],
   "source": [
    "estadisticos_2d"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28e17497-4e11-4fad-9cf5-727078caf77e",
   "metadata": {},
   "source": [
    "Obtener los valores menores a 12 en el ndarray \"estadisticos_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "65137100-5cbc-4047-b8c7-bc9d20e0e3ca",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5ff3cdc3-7b84-424f-8b1f-b7d9a8851d03",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "a6008ae4-8a10-4ff4-92f1-1f82b82c8b5a",
   "metadata": {},
   "source": [
    "__Ejercicio 20:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "25fdd4ed-5a3f-4a3b-8a08-486776700b92",
   "metadata": {},
   "outputs": [],
   "source": [
    "np1 = rg.integers(20,size=(3,3))\n",
    "np2 = rg.integers(20,size=(3,3))\n",
    "print(np1,\"\\n\\n\",np2)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ad017f47-c974-4168-9c79-bd407cec5ef8",
   "metadata": {},
   "source": [
    "Utilizar np.vstack para unir los ndarray \"np1\" y \"np2\" verticalmente"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c8b9b36b-7bfb-4027-91ea-626227546983",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "66f8921c-45d8-4c7d-9430-999d5fa3c335",
   "metadata": {},
   "source": [
    "Utilizar np.vstack para unir los ndarray \"np1\" y \"np2\" horizontalmente"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "44fbc502-904a-461e-a74f-23d10bc37a12",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "a7eafbf0-968b-41cb-b966-c67bb42bf049",
   "metadata": {},
   "source": [
    "__Ejercicio 21:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a929ea5f-6635-48f3-a32a-d6f5bea564f7",
   "metadata": {},
   "outputs": [],
   "source": [
    "enteros = rg.integers(20,size=(10))\n",
    "enteros"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f07668c4-1d9a-46e9-8e6d-a80aaeb3961c",
   "metadata": {},
   "source": [
    "Seleccionar los primeros 6 valores del ndarray \"enteros\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "62f98dce-8e1e-4749-86b4-e1bed5f44081",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "7c243a71-e44a-4467-9621-0da26997e335",
   "metadata": {},
   "source": [
    "Seleccionar los valores en la posición 0,2 y 4 del ndarray \"enteros\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5e09e7ea-3ac8-48ba-8330-9b4213db98bb",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6178664b-de22-41cb-a499-53d704784b94",
   "metadata": {},
   "source": [
    "Seleccionar todos los valores con un indice par en el ndarray \"enteros\" (0,2,4,...)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11169abe-382b-4b5f-8332-371f3edabcfc",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "fd2d863b-c2cf-4de4-bcdc-59fdfb9170a5",
   "metadata": {},
   "source": [
    "__Ejercicio 22:__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6c5257e2-4553-48a6-a8f2-765c128d18c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "enteros_2d = rg.integers(20,size=(8,5))\n",
    "enteros_2d"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "37bc0a12-9c60-4973-a312-80804c150ada",
   "metadata": {},
   "source": [
    "Seleccionar el cuarto valor en el segundo array de \"enteros_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b1647bbd-6a30-4d1b-a04e-2381da07d9d0",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "8735f0f9-4d36-4640-b47c-539587896e73",
   "metadata": {},
   "source": [
    "Seleccionar el segundo valor en los arrays con indice 3, 4 y 5 de \"enteros_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40b2a7ad-eaea-425d-a8bc-058fba013c59",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "ed773fbb-8795-4e25-adb1-3952ab3be59f",
   "metadata": {},
   "source": [
    "Seleccionar los 2 primeros valores en los arrays con indice 4, 5 y 6 de \"enteros_2d\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "730ceebe-04bc-46d1-a8a2-d98207d66afb",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
