Skip to main content

Álgebra lineal simplificada con integración a Google Sheets para estudiantes

Project description

📚 Álgebra Lineal con Google Sheets

Álgebra lineal simplificada para estudiantes con integración perfecta a Google Sheets.

Permite a estudiantes y profesores trabajar con matrices almacenadas en Google Sheets usando Python de forma intuitiva y sencilla. Perfecto para cursos de álgebra lineal, análisis numérico y ciencias de datos.

🚀 Instalación

pip install algebra-lineal-sheets

¡Y listo! No necesitas configurar nada más.

📋 Uso Básico

1. Preparar Google Sheet

  • Crear Google Sheet llamado matrices
  • Añadir pestañas con nombres: A, B, v, etc.
  • Llenar con datos numéricos (sin texto ni fórmulas)

2. Usar en Python

# Importar y configurar (una vez por sesión)
from algebra_lineal import *
configurar()

# Ver qué matrices tienes disponibles
workspace()

# Importar matrices específicas
importar('A', 'B', 'v')

# Realizar operaciones de álgebra lineal
C = A @ B                      # Multiplicación matricial
suma = A + B                   # Suma de matrices
Ainv = np.linalg.inv(A)       # Matriz inversa
det_A = np.linalg.det(A)      # Determinante

# Exportar resultados de vuelta a Google Sheets
exportar('C', 'suma', 'Ainv')

📊 Ejemplo Completo

from algebra_lineal import *
import numpy as np

# Configurar conexión con Google Sheets
configurar()

# Ver workspace
workspace()
# 🏢 WORKSPACE: 'matrices'
# ===========================================================================
# #   NOMBRE               DIMENSIONES  TIPO           
# ---------------------------------------------------------------------------
# 1   A                    3×3          📋 Matriz      
# 2   B                    3×3          📋 Matriz      
# 3   v                    3×1          📉 Vector columna

# Importar matrices necesarias
importar('A', 'B', 'v')

# Resolver sistema de ecuaciones Ax = b
b = v  # Usar vector v como término independiente
x = np.linalg.solve(A, b)

# Verificar solución
verificacion = A @ x - b
error = np.linalg.norm(verificacion)

print(f"Solución: x = {x}")
print(f"Error: {error:.2e}")

# Exportar resultados
exportar('x', 'verificacion')

🔧 Funciones Disponibles

Función Descripción Ejemplo
configurar() Configuración inicial configurar()
workspace() Ver matrices en Sheets workspace()
importar() Importar matrices importar('A', 'B')
exportar() Exportar resultados exportar('C')
cambiar_sheet() Cambiar archivo cambiar_sheet('proyecto2')
ayuda() Ayuda completa ayuda()

📚 Para Estudiantes

Google Colab (Recomendado)

# 1. Instalar paquete
!pip install algebra-lineal-sheets

# 2. Importar y configurar
from algebra_lineal import *
configurar()

# 3. ¡Empezar a trabajar!
workspace()
importar('A', 'B')
resultado = A @ B
exportar('resultado')

Operaciones Comunes

# Después de importar matrices A, B, v
C = A @ B                          # Multiplicación matricial
suma = A + B                       # Suma
transpuesta = A.T                  # Transpuesta
inversa = np.linalg.inv(A)         # Inversa (si existe)
determinante = np.linalg.det(A)    # Determinante
autovalores = np.linalg.eigvals(A) # Autovalores
rango = np.linalg.matrix_rank(A)   # Rango
norma = np.linalg.norm(v)          # Norma de vector

👨‍🏫 Para Profesores

Ventajas Pedagógicas

  • Enfoque en matemáticas: Los estudiantes se concentran en álgebra lineal, no en programación
  • Datos modificables: Cambiar valores en Google Sheets sin tocar código
  • Colaborativo: Fácil compartir matrices entre estudiantes
  • Visual: Ver resultados inmediatamente en Google Sheets
  • Escalable: Funciona igual para 10 o 1000 estudiantes

Configuración de Clase

  1. Crear plantilla: Google Sheet con matrices ejemplo
  2. Compartir plantilla: Estudiantes hacen copia
  3. Dar instrucciones simples:
    !pip install algebra-lineal-sheets
    from algebra_lineal import *
    configurar()
    

Ejemplo de Ejercicio

# Ejercicio: Transformaciones lineales
importar('T', 'v1', 'v2', 'v3')  # Matriz T y vectores

# Aplicar transformación
w1 = T @ v1
w2 = T @ v2  
w3 = T @ v3

# Analizar propiedades
det_T = np.linalg.det(T)
es_invertible = abs(det_T) > 1e-10

# Exportar análisis
exportar('w1', 'w2', 'w3', 'det_T')

🛠️ Configuración Avanzada

Múltiples Archivos

# Cambiar archivo de trabajo
cambiar_sheet('proyecto_final')
workspace()
importar('datos_experimentales')

Verificar Variables

# Ver qué variables están disponibles para exportar
listar_variables_exportables()

❓ Solución de Problemas

Error: "No se pudo abrir 'matrices'"

  • ✅ Verificar que el Google Sheet existe
  • ✅ Verificar que se llama exactamente 'matrices'
  • ✅ Verificar permisos de acceso

Error: "Variable no encontrada"

  • ✅ Ejecutar importar() antes de usar variables
  • ✅ Verificar nombres exactos con workspace()

Error de autenticación

  • ✅ Ejecutar configurar() nuevamente
  • ✅ En Colab: Runtime → Restart and run all

🔄 Actualización

pip install --upgrade algebra-lineal-sheets

📦 Requisitos

  • Python 3.8+
  • numpy >= 1.20.0
  • gspread >= 5.0.0
  • google-auth >= 2.0.0

Se instalan automáticamente con el paquete.

📄 Licencia

MIT License - Ver LICENSE para más detalles.

🤝 Contribuir

¡Las contribuciones son bienvenidas!

📧 Contacto

🔗 Enlaces Útiles


¡Si te resulta útil, compártelo con otros profesores!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

algebra_lineal_sheets-1.0.2.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

algebra_lineal_sheets-1.0.2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file algebra_lineal_sheets-1.0.2.tar.gz.

File metadata

  • Download URL: algebra_lineal_sheets-1.0.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for algebra_lineal_sheets-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c005dec8a23c373210a10e636632c4bba8eaa90e063bd464b1553a40611c9642
MD5 48040c682da12159309004aa328a42c5
BLAKE2b-256 ea75d739adf84dc00d91fe490c5d0c476de5d076da4b46fa78cdfcefba6a8004

See more details on using hashes here.

File details

Details for the file algebra_lineal_sheets-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for algebra_lineal_sheets-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9cbd45201d42a50a6112fb49ce22d7da5ad4b6a5428e200235df672db9ae97f4
MD5 49b44024e66c1e7edff127433e903fae
BLAKE2b-256 4afe9633def89fe6e76ee5204bbf1eefb8540e89544ec9cf7d526b2d87761d05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page