Skip to content

Commit

Permalink
feat: tipado_basico
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrucesdeveloper committed Oct 24, 2024
1 parent a2b5fa1 commit 5269d94
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion memoria/tipado_basico.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,16 @@ <h3>Declaracion de tensor en numpy y recorrerlo con range</h3>
print(f"Shape del elemento: {element.shape}") # [2]
print(f"Size del elemento: {len(element)}") # 2
print(f"Valor: {element}")


# Recorrer el tensor con doble range
for i: int in range(len(tensor)): # B(base type): int, S(shape): [s1=2], s(size): 2 elementos
for j: int in range(len(tensor[i])): # B(base type): int, S(shape): [s1=2], s(size): 2 elementos
# B(base type): float
# S(shape): []
# s(size): 1 elemento
element = tensor[i][j]
print(f"Base type: float")
print(f"Valor del elemento [{i},{j}]: {element}") # Elemento escalar
</code></pre>

</div>
Expand Down

0 comments on commit 5269d94

Please sign in to comment.