algebra-lineal-sheets 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- algebra_lineal_sheets-1.0.0/LICENSE +21 -0
- algebra_lineal_sheets-1.0.0/PKG-INFO +274 -0
- algebra_lineal_sheets-1.0.0/README.md +235 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal/__init__.py +78 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal/core.py +617 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal_sheets.egg-info/PKG-INFO +274 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal_sheets.egg-info/SOURCES.txt +10 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal_sheets.egg-info/dependency_links.txt +1 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal_sheets.egg-info/requires.txt +10 -0
- algebra_lineal_sheets-1.0.0/algebra_lineal_sheets.egg-info/top_level.txt +1 -0
- algebra_lineal_sheets-1.0.0/pyproject.toml +63 -0
- algebra_lineal_sheets-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Francisco Pérez Mogollón
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: algebra-lineal-sheets
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Álgebra lineal simplificada con integración a Google Sheets para estudiantes
|
|
5
|
+
Author-email: Francisco Pérez Mogollón <faperez9@utpl.edu.ec>
|
|
6
|
+
Maintainer-email: Francisco Pérez Mogollón <faperez9@utpl.edu.ec>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://pypi.org/project/algebra-lineal-sheets/
|
|
9
|
+
Project-URL: Documentation, https://pypi.org/project/algebra-lineal-sheets/
|
|
10
|
+
Project-URL: Repository, https://github.com/tu-usuario/algebra-lineal-sheets
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/tu-usuario/algebra-lineal-sheets/issues
|
|
12
|
+
Keywords: algebra,lineal,matrices,google-sheets,educacion,estudiantes,matematicas
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Topic :: Education
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Operating System :: OS Independent
|
|
25
|
+
Classifier: Framework :: Jupyter
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: numpy>=1.20.0
|
|
30
|
+
Requires-Dist: gspread>=5.0.0
|
|
31
|
+
Requires-Dist: google-auth>=2.0.0
|
|
32
|
+
Requires-Dist: google-auth-oauthlib>=0.5.0
|
|
33
|
+
Requires-Dist: google-auth-httplib2>=0.1.0
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
36
|
+
Requires-Dist: build>=0.7.0; extra == "dev"
|
|
37
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
# 📚 Álgebra Lineal con Google Sheets
|
|
41
|
+
**Álgebra lineal simplificada para estudiantes con integración perfecta a Google Sheets.**
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
## 🚀 Instalación
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install algebra-lineal-sheets
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
¡Y listo! No necesitas configurar nada más.
|
|
52
|
+
|
|
53
|
+
## 📋 Uso Básico
|
|
54
|
+
|
|
55
|
+
### 1. Preparar Google Sheet
|
|
56
|
+
- Crear Google Sheet llamado `matrices`
|
|
57
|
+
- Añadir pestañas con nombres: `A`, `B`, `v`, etc.
|
|
58
|
+
- Llenar con datos numéricos (sin texto ni fórmulas)
|
|
59
|
+
|
|
60
|
+
### 2. Usar en Python
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
# Importar y configurar (una vez por sesión)
|
|
64
|
+
from algebra_lineal import *
|
|
65
|
+
configurar()
|
|
66
|
+
|
|
67
|
+
# Ver qué matrices tienes disponibles
|
|
68
|
+
workspace()
|
|
69
|
+
|
|
70
|
+
# Importar matrices específicas
|
|
71
|
+
importar('A', 'B', 'v')
|
|
72
|
+
|
|
73
|
+
# Realizar operaciones de álgebra lineal
|
|
74
|
+
C = A @ B # Multiplicación matricial
|
|
75
|
+
suma = A + B # Suma de matrices
|
|
76
|
+
Ainv = np.linalg.inv(A) # Matriz inversa
|
|
77
|
+
det_A = np.linalg.det(A) # Determinante
|
|
78
|
+
|
|
79
|
+
# Exportar resultados de vuelta a Google Sheets
|
|
80
|
+
exportar('C', 'suma', 'Ainv')
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 📊 Ejemplo Completo
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from algebra_lineal import *
|
|
87
|
+
import numpy as np
|
|
88
|
+
|
|
89
|
+
# Configurar conexión con Google Sheets
|
|
90
|
+
configurar()
|
|
91
|
+
|
|
92
|
+
# Ver workspace
|
|
93
|
+
workspace()
|
|
94
|
+
# 🏢 WORKSPACE: 'matrices'
|
|
95
|
+
# ===========================================================================
|
|
96
|
+
# # NOMBRE DIMENSIONES TIPO
|
|
97
|
+
# ---------------------------------------------------------------------------
|
|
98
|
+
# 1 A 3×3 📋 Matriz
|
|
99
|
+
# 2 B 3×3 📋 Matriz
|
|
100
|
+
# 3 v 3×1 📉 Vector columna
|
|
101
|
+
|
|
102
|
+
# Importar matrices necesarias
|
|
103
|
+
importar('A', 'B', 'v')
|
|
104
|
+
|
|
105
|
+
# Resolver sistema de ecuaciones Ax = b
|
|
106
|
+
b = v # Usar vector v como término independiente
|
|
107
|
+
x = np.linalg.solve(A, b)
|
|
108
|
+
|
|
109
|
+
# Verificar solución
|
|
110
|
+
verificacion = A @ x - b
|
|
111
|
+
error = np.linalg.norm(verificacion)
|
|
112
|
+
|
|
113
|
+
print(f"Solución: x = {x}")
|
|
114
|
+
print(f"Error: {error:.2e}")
|
|
115
|
+
|
|
116
|
+
# Exportar resultados
|
|
117
|
+
exportar('x', 'verificacion')
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## 🔧 Funciones Disponibles
|
|
121
|
+
|
|
122
|
+
| Función | Descripción | Ejemplo |
|
|
123
|
+
|---------|-------------|---------|
|
|
124
|
+
| `configurar()` | Configuración inicial | `configurar()` |
|
|
125
|
+
| `workspace()` | Ver matrices en Sheets | `workspace()` |
|
|
126
|
+
| `importar()` | Importar matrices | `importar('A', 'B')` |
|
|
127
|
+
| `exportar()` | Exportar resultados | `exportar('C')` |
|
|
128
|
+
| `cambiar_sheet()` | Cambiar archivo | `cambiar_sheet('proyecto2')` |
|
|
129
|
+
| `ayuda()` | Ayuda completa | `ayuda()` |
|
|
130
|
+
|
|
131
|
+
## 📚 Para Estudiantes
|
|
132
|
+
|
|
133
|
+
### Google Colab (Recomendado)
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
# 1. Instalar paquete
|
|
137
|
+
!pip install algebra-lineal-sheets
|
|
138
|
+
|
|
139
|
+
# 2. Importar y configurar
|
|
140
|
+
from algebra_lineal import *
|
|
141
|
+
configurar()
|
|
142
|
+
|
|
143
|
+
# 3. ¡Empezar a trabajar!
|
|
144
|
+
workspace()
|
|
145
|
+
importar('A', 'B')
|
|
146
|
+
resultado = A @ B
|
|
147
|
+
exportar('resultado')
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Operaciones Comunes
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
# Después de importar matrices A, B, v
|
|
154
|
+
C = A @ B # Multiplicación matricial
|
|
155
|
+
suma = A + B # Suma
|
|
156
|
+
transpuesta = A.T # Transpuesta
|
|
157
|
+
inversa = np.linalg.inv(A) # Inversa (si existe)
|
|
158
|
+
determinante = np.linalg.det(A) # Determinante
|
|
159
|
+
autovalores = np.linalg.eigvals(A) # Autovalores
|
|
160
|
+
rango = np.linalg.matrix_rank(A) # Rango
|
|
161
|
+
norma = np.linalg.norm(v) # Norma de vector
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## 👨🏫 Para Profesores
|
|
165
|
+
|
|
166
|
+
### Ventajas Pedagógicas
|
|
167
|
+
|
|
168
|
+
- **Enfoque en matemáticas**: Los estudiantes se concentran en álgebra lineal, no en programación
|
|
169
|
+
- **Datos modificables**: Cambiar valores en Google Sheets sin tocar código
|
|
170
|
+
- **Colaborativo**: Fácil compartir matrices entre estudiantes
|
|
171
|
+
- **Visual**: Ver resultados inmediatamente en Google Sheets
|
|
172
|
+
- **Escalable**: Funciona igual para 10 o 1000 estudiantes
|
|
173
|
+
|
|
174
|
+
### Configuración de Clase
|
|
175
|
+
|
|
176
|
+
1. **Crear plantilla**: Google Sheet con matrices ejemplo
|
|
177
|
+
2. **Compartir plantilla**: Estudiantes hacen copia
|
|
178
|
+
3. **Dar instrucciones simples**:
|
|
179
|
+
```python
|
|
180
|
+
!pip install algebra-lineal-sheets
|
|
181
|
+
from algebra_lineal import *
|
|
182
|
+
configurar()
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Ejemplo de Ejercicio
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
# Ejercicio: Transformaciones lineales
|
|
189
|
+
importar('T', 'v1', 'v2', 'v3') # Matriz T y vectores
|
|
190
|
+
|
|
191
|
+
# Aplicar transformación
|
|
192
|
+
w1 = T @ v1
|
|
193
|
+
w2 = T @ v2
|
|
194
|
+
w3 = T @ v3
|
|
195
|
+
|
|
196
|
+
# Analizar propiedades
|
|
197
|
+
det_T = np.linalg.det(T)
|
|
198
|
+
es_invertible = abs(det_T) > 1e-10
|
|
199
|
+
|
|
200
|
+
# Exportar análisis
|
|
201
|
+
exportar('w1', 'w2', 'w3', 'det_T')
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 🛠️ Configuración Avanzada
|
|
205
|
+
|
|
206
|
+
### Múltiples Archivos
|
|
207
|
+
|
|
208
|
+
```python
|
|
209
|
+
# Cambiar archivo de trabajo
|
|
210
|
+
cambiar_sheet('proyecto_final')
|
|
211
|
+
workspace()
|
|
212
|
+
importar('datos_experimentales')
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Verificar Variables
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
# Ver qué variables están disponibles para exportar
|
|
219
|
+
listar_variables_exportables()
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## ❓ Solución de Problemas
|
|
223
|
+
|
|
224
|
+
### Error: "No se pudo abrir 'matrices'"
|
|
225
|
+
- ✅ Verificar que el Google Sheet existe
|
|
226
|
+
- ✅ Verificar que se llama exactamente 'matrices'
|
|
227
|
+
- ✅ Verificar permisos de acceso
|
|
228
|
+
|
|
229
|
+
### Error: "Variable no encontrada"
|
|
230
|
+
- ✅ Ejecutar `importar()` antes de usar variables
|
|
231
|
+
- ✅ Verificar nombres exactos con `workspace()`
|
|
232
|
+
|
|
233
|
+
### Error de autenticación
|
|
234
|
+
- ✅ Ejecutar `configurar()` nuevamente
|
|
235
|
+
- ✅ En Colab: Runtime → Restart and run all
|
|
236
|
+
|
|
237
|
+
## 🔄 Actualización
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
pip install --upgrade algebra-lineal-sheets
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## 📦 Requisitos
|
|
244
|
+
|
|
245
|
+
- Python 3.8+
|
|
246
|
+
- numpy >= 1.20.0
|
|
247
|
+
- gspread >= 5.0.0
|
|
248
|
+
- google-auth >= 2.0.0
|
|
249
|
+
|
|
250
|
+
Se instalan automáticamente con el paquete.
|
|
251
|
+
|
|
252
|
+
## 📄 Licencia
|
|
253
|
+
|
|
254
|
+
MIT License - Ver [LICENSE](https://github.com/tu-usuario/algebra-lineal-sheets/blob/main/LICENSE) para más detalles.
|
|
255
|
+
|
|
256
|
+
## 🤝 Contribuir
|
|
257
|
+
|
|
258
|
+
¡Las contribuciones son bienvenidas!
|
|
259
|
+
|
|
260
|
+
## 📧 Contacto
|
|
261
|
+
|
|
262
|
+
- **Autor:** Francisco Pérez Mogollón
|
|
263
|
+
- **Email:** faperez9@utpl.edu.ec
|
|
264
|
+
- **PyPI:** https://pypi.org/project/algebra-lineal-sheets/
|
|
265
|
+
|
|
266
|
+
## 🔗 Enlaces Útiles
|
|
267
|
+
|
|
268
|
+
- [Google Colab](https://colab.research.google.com/)
|
|
269
|
+
- [Google Sheets](https://sheets.google.com/)
|
|
270
|
+
- [NumPy Documentation](https://numpy.org/doc/)
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
⭐ **¡Si te resulta útil, compártelo con otros profesores!** ⭐
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# 📚 Álgebra Lineal con Google Sheets
|
|
2
|
+
**Álgebra lineal simplificada para estudiantes con integración perfecta a Google Sheets.**
|
|
3
|
+
|
|
4
|
+
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.
|
|
5
|
+
|
|
6
|
+
## 🚀 Instalación
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install algebra-lineal-sheets
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
¡Y listo! No necesitas configurar nada más.
|
|
13
|
+
|
|
14
|
+
## 📋 Uso Básico
|
|
15
|
+
|
|
16
|
+
### 1. Preparar Google Sheet
|
|
17
|
+
- Crear Google Sheet llamado `matrices`
|
|
18
|
+
- Añadir pestañas con nombres: `A`, `B`, `v`, etc.
|
|
19
|
+
- Llenar con datos numéricos (sin texto ni fórmulas)
|
|
20
|
+
|
|
21
|
+
### 2. Usar en Python
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
# Importar y configurar (una vez por sesión)
|
|
25
|
+
from algebra_lineal import *
|
|
26
|
+
configurar()
|
|
27
|
+
|
|
28
|
+
# Ver qué matrices tienes disponibles
|
|
29
|
+
workspace()
|
|
30
|
+
|
|
31
|
+
# Importar matrices específicas
|
|
32
|
+
importar('A', 'B', 'v')
|
|
33
|
+
|
|
34
|
+
# Realizar operaciones de álgebra lineal
|
|
35
|
+
C = A @ B # Multiplicación matricial
|
|
36
|
+
suma = A + B # Suma de matrices
|
|
37
|
+
Ainv = np.linalg.inv(A) # Matriz inversa
|
|
38
|
+
det_A = np.linalg.det(A) # Determinante
|
|
39
|
+
|
|
40
|
+
# Exportar resultados de vuelta a Google Sheets
|
|
41
|
+
exportar('C', 'suma', 'Ainv')
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 📊 Ejemplo Completo
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from algebra_lineal import *
|
|
48
|
+
import numpy as np
|
|
49
|
+
|
|
50
|
+
# Configurar conexión con Google Sheets
|
|
51
|
+
configurar()
|
|
52
|
+
|
|
53
|
+
# Ver workspace
|
|
54
|
+
workspace()
|
|
55
|
+
# 🏢 WORKSPACE: 'matrices'
|
|
56
|
+
# ===========================================================================
|
|
57
|
+
# # NOMBRE DIMENSIONES TIPO
|
|
58
|
+
# ---------------------------------------------------------------------------
|
|
59
|
+
# 1 A 3×3 📋 Matriz
|
|
60
|
+
# 2 B 3×3 📋 Matriz
|
|
61
|
+
# 3 v 3×1 📉 Vector columna
|
|
62
|
+
|
|
63
|
+
# Importar matrices necesarias
|
|
64
|
+
importar('A', 'B', 'v')
|
|
65
|
+
|
|
66
|
+
# Resolver sistema de ecuaciones Ax = b
|
|
67
|
+
b = v # Usar vector v como término independiente
|
|
68
|
+
x = np.linalg.solve(A, b)
|
|
69
|
+
|
|
70
|
+
# Verificar solución
|
|
71
|
+
verificacion = A @ x - b
|
|
72
|
+
error = np.linalg.norm(verificacion)
|
|
73
|
+
|
|
74
|
+
print(f"Solución: x = {x}")
|
|
75
|
+
print(f"Error: {error:.2e}")
|
|
76
|
+
|
|
77
|
+
# Exportar resultados
|
|
78
|
+
exportar('x', 'verificacion')
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 🔧 Funciones Disponibles
|
|
82
|
+
|
|
83
|
+
| Función | Descripción | Ejemplo |
|
|
84
|
+
|---------|-------------|---------|
|
|
85
|
+
| `configurar()` | Configuración inicial | `configurar()` |
|
|
86
|
+
| `workspace()` | Ver matrices en Sheets | `workspace()` |
|
|
87
|
+
| `importar()` | Importar matrices | `importar('A', 'B')` |
|
|
88
|
+
| `exportar()` | Exportar resultados | `exportar('C')` |
|
|
89
|
+
| `cambiar_sheet()` | Cambiar archivo | `cambiar_sheet('proyecto2')` |
|
|
90
|
+
| `ayuda()` | Ayuda completa | `ayuda()` |
|
|
91
|
+
|
|
92
|
+
## 📚 Para Estudiantes
|
|
93
|
+
|
|
94
|
+
### Google Colab (Recomendado)
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# 1. Instalar paquete
|
|
98
|
+
!pip install algebra-lineal-sheets
|
|
99
|
+
|
|
100
|
+
# 2. Importar y configurar
|
|
101
|
+
from algebra_lineal import *
|
|
102
|
+
configurar()
|
|
103
|
+
|
|
104
|
+
# 3. ¡Empezar a trabajar!
|
|
105
|
+
workspace()
|
|
106
|
+
importar('A', 'B')
|
|
107
|
+
resultado = A @ B
|
|
108
|
+
exportar('resultado')
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Operaciones Comunes
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Después de importar matrices A, B, v
|
|
115
|
+
C = A @ B # Multiplicación matricial
|
|
116
|
+
suma = A + B # Suma
|
|
117
|
+
transpuesta = A.T # Transpuesta
|
|
118
|
+
inversa = np.linalg.inv(A) # Inversa (si existe)
|
|
119
|
+
determinante = np.linalg.det(A) # Determinante
|
|
120
|
+
autovalores = np.linalg.eigvals(A) # Autovalores
|
|
121
|
+
rango = np.linalg.matrix_rank(A) # Rango
|
|
122
|
+
norma = np.linalg.norm(v) # Norma de vector
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 👨🏫 Para Profesores
|
|
126
|
+
|
|
127
|
+
### Ventajas Pedagógicas
|
|
128
|
+
|
|
129
|
+
- **Enfoque en matemáticas**: Los estudiantes se concentran en álgebra lineal, no en programación
|
|
130
|
+
- **Datos modificables**: Cambiar valores en Google Sheets sin tocar código
|
|
131
|
+
- **Colaborativo**: Fácil compartir matrices entre estudiantes
|
|
132
|
+
- **Visual**: Ver resultados inmediatamente en Google Sheets
|
|
133
|
+
- **Escalable**: Funciona igual para 10 o 1000 estudiantes
|
|
134
|
+
|
|
135
|
+
### Configuración de Clase
|
|
136
|
+
|
|
137
|
+
1. **Crear plantilla**: Google Sheet con matrices ejemplo
|
|
138
|
+
2. **Compartir plantilla**: Estudiantes hacen copia
|
|
139
|
+
3. **Dar instrucciones simples**:
|
|
140
|
+
```python
|
|
141
|
+
!pip install algebra-lineal-sheets
|
|
142
|
+
from algebra_lineal import *
|
|
143
|
+
configurar()
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Ejemplo de Ejercicio
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
# Ejercicio: Transformaciones lineales
|
|
150
|
+
importar('T', 'v1', 'v2', 'v3') # Matriz T y vectores
|
|
151
|
+
|
|
152
|
+
# Aplicar transformación
|
|
153
|
+
w1 = T @ v1
|
|
154
|
+
w2 = T @ v2
|
|
155
|
+
w3 = T @ v3
|
|
156
|
+
|
|
157
|
+
# Analizar propiedades
|
|
158
|
+
det_T = np.linalg.det(T)
|
|
159
|
+
es_invertible = abs(det_T) > 1e-10
|
|
160
|
+
|
|
161
|
+
# Exportar análisis
|
|
162
|
+
exportar('w1', 'w2', 'w3', 'det_T')
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## 🛠️ Configuración Avanzada
|
|
166
|
+
|
|
167
|
+
### Múltiples Archivos
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
# Cambiar archivo de trabajo
|
|
171
|
+
cambiar_sheet('proyecto_final')
|
|
172
|
+
workspace()
|
|
173
|
+
importar('datos_experimentales')
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Verificar Variables
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
# Ver qué variables están disponibles para exportar
|
|
180
|
+
listar_variables_exportables()
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## ❓ Solución de Problemas
|
|
184
|
+
|
|
185
|
+
### Error: "No se pudo abrir 'matrices'"
|
|
186
|
+
- ✅ Verificar que el Google Sheet existe
|
|
187
|
+
- ✅ Verificar que se llama exactamente 'matrices'
|
|
188
|
+
- ✅ Verificar permisos de acceso
|
|
189
|
+
|
|
190
|
+
### Error: "Variable no encontrada"
|
|
191
|
+
- ✅ Ejecutar `importar()` antes de usar variables
|
|
192
|
+
- ✅ Verificar nombres exactos con `workspace()`
|
|
193
|
+
|
|
194
|
+
### Error de autenticación
|
|
195
|
+
- ✅ Ejecutar `configurar()` nuevamente
|
|
196
|
+
- ✅ En Colab: Runtime → Restart and run all
|
|
197
|
+
|
|
198
|
+
## 🔄 Actualización
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
pip install --upgrade algebra-lineal-sheets
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 📦 Requisitos
|
|
205
|
+
|
|
206
|
+
- Python 3.8+
|
|
207
|
+
- numpy >= 1.20.0
|
|
208
|
+
- gspread >= 5.0.0
|
|
209
|
+
- google-auth >= 2.0.0
|
|
210
|
+
|
|
211
|
+
Se instalan automáticamente con el paquete.
|
|
212
|
+
|
|
213
|
+
## 📄 Licencia
|
|
214
|
+
|
|
215
|
+
MIT License - Ver [LICENSE](https://github.com/tu-usuario/algebra-lineal-sheets/blob/main/LICENSE) para más detalles.
|
|
216
|
+
|
|
217
|
+
## 🤝 Contribuir
|
|
218
|
+
|
|
219
|
+
¡Las contribuciones son bienvenidas!
|
|
220
|
+
|
|
221
|
+
## 📧 Contacto
|
|
222
|
+
|
|
223
|
+
- **Autor:** Francisco Pérez Mogollón
|
|
224
|
+
- **Email:** faperez9@utpl.edu.ec
|
|
225
|
+
- **PyPI:** https://pypi.org/project/algebra-lineal-sheets/
|
|
226
|
+
|
|
227
|
+
## 🔗 Enlaces Útiles
|
|
228
|
+
|
|
229
|
+
- [Google Colab](https://colab.research.google.com/)
|
|
230
|
+
- [Google Sheets](https://sheets.google.com/)
|
|
231
|
+
- [NumPy Documentation](https://numpy.org/doc/)
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
⭐ **¡Si te resulta útil, compártelo con otros profesores!** ⭐
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
📚 ALGEBRA LINEAL - Paquete para Google Sheets
|
|
3
|
+
==============================================
|
|
4
|
+
|
|
5
|
+
Álgebra lineal simplificada con Google Sheets integration.
|
|
6
|
+
Perfecto para estudiantes y profesores.
|
|
7
|
+
|
|
8
|
+
Instalación:
|
|
9
|
+
pip install algebra-lineal-sheets
|
|
10
|
+
|
|
11
|
+
Uso básico:
|
|
12
|
+
from algebra_lineal import *
|
|
13
|
+
configurar()
|
|
14
|
+
importar('A', 'B')
|
|
15
|
+
C = A @ B
|
|
16
|
+
exportar('C')
|
|
17
|
+
|
|
18
|
+
Autor: Francisco Pérez Mogollón
|
|
19
|
+
Email: fperez9@utpl.edu.ec
|
|
20
|
+
Versión: 1.0.0
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
# Importar todas las funciones principales del módulo core
|
|
24
|
+
from .core import (
|
|
25
|
+
configurar,
|
|
26
|
+
workspace,
|
|
27
|
+
importar,
|
|
28
|
+
exportar,
|
|
29
|
+
cambiar_sheet,
|
|
30
|
+
ayuda,
|
|
31
|
+
version,
|
|
32
|
+
listar_variables_exportables
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Definir qué se importa cuando alguien hace "from algebra_lineal import *"
|
|
36
|
+
__all__ = [
|
|
37
|
+
'configurar',
|
|
38
|
+
'workspace',
|
|
39
|
+
'importar',
|
|
40
|
+
'exportar',
|
|
41
|
+
'cambiar_sheet',
|
|
42
|
+
'ayuda',
|
|
43
|
+
'version',
|
|
44
|
+
'listar_variables_exportables'
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
# Metadatos del paquete (IMPORTANTE: mantener sincronizado con pyproject.toml)
|
|
48
|
+
__version__ = "1.0.0"
|
|
49
|
+
__author__ = "Francisco Pérez Mogollón"
|
|
50
|
+
__email__ = "fperez9@utpl.edu.ec"
|
|
51
|
+
__description__ = "Álgebra lineal simplificada con integración a Google Sheets"
|
|
52
|
+
__url__ = "https://pypi.org/project/algebra-lineal-sheets/"
|
|
53
|
+
|
|
54
|
+
# Mensaje de bienvenida al importar (más profesional para PyPI)
|
|
55
|
+
print("📚 ALGEBRA LINEAL v1.0.0")
|
|
56
|
+
print("🎓 Para estudiantes de álgebra lineal")
|
|
57
|
+
print("🔧 Ejecuta: configurar() para empezar")
|
|
58
|
+
print("📖 Ayuda completa: ayuda()")
|
|
59
|
+
print("🔗 PyPI: https://pypi.org/project/algebra-lineal-sheets/")
|
|
60
|
+
|
|
61
|
+
# Función de conveniencia para verificar instalación
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def verificar_instalacion():
|
|
65
|
+
"""
|
|
66
|
+
Verifica que el paquete esté instalado correctamente.
|
|
67
|
+
"""
|
|
68
|
+
try:
|
|
69
|
+
import numpy
|
|
70
|
+
import gspread
|
|
71
|
+
from google.auth import default
|
|
72
|
+
print("✅ Todas las dependencias están instaladas correctamente")
|
|
73
|
+
print("🚀 ¡Listo para usar algebra_lineal!")
|
|
74
|
+
return True
|
|
75
|
+
except ImportError as e:
|
|
76
|
+
print(f"❌ Error: Dependencia faltante - {e}")
|
|
77
|
+
print("💡 Ejecuta: pip install --upgrade algebra-lineal-sheets")
|
|
78
|
+
return False
|