mnspy 0.9.11__py3-none-any.whl → 0.9.13__py3-none-any.whl

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.
@@ -66,7 +66,8 @@ class Integral:
66
66
  Modifica la figura actual de Matplotlib.
67
67
  """
68
68
  if self._tipo == 'discreto':
69
- plt.plot(self._x, self._y, 'o--', c='b', lw=1, label='Puntos')
69
+ plt.scatter(self._x, self._y, marker='o', c='b', lw=1, label='Puntos')
70
+ #plt.plot(self._x, self._y, 'o--', c='b', lw=1, label='Puntos')
70
71
  elif self._tipo == 'función':
71
72
  x = np.linspace(self._a, self._b)
72
73
  y = self._f(x)
@@ -97,8 +97,10 @@ class Romberg(Trapezoidal):
97
97
  x = np.linspace(self._a, self._b, (2 ** i) + 1)
98
98
  y = self._f(x)
99
99
  ind_color = 'C' + str(i)
100
- plt.plot(x, y, 'o--', color=ind_color, lw=1)
101
- plt.fill_between(x, y, color=ind_color, alpha=0.3, label='Trapecio n=' + str((2 ** i)))
100
+ plt.stem(x, y, linefmt='C0--', markerfmt='C0o', basefmt='C0-')
101
+ plt.fill_between(x, y, color=ind_color, alpha=0.3, label='Regla de Romberg' + ' n=' + str((2 ** i)))
102
+ # plt.plot(x, y, 'o--', color=ind_color, lw=1)
103
+ # plt.fill_between(x, y, color=ind_color, alpha=0.3, label='Trapecio n=' + str((2 ** i)))
102
104
 
103
105
  def graficar(self):
104
106
  """Genera una gráfica del proceso de integración de Romberg.
@@ -95,7 +95,8 @@ class Simpson13(Integral):
95
95
  # Se usa una interpolación cuadrática para visualizar las parábolas
96
96
  spl = interp1d(x, y, kind='quadratic')
97
97
  y_smooth = spl(xvals)
98
- plt.plot(x, y, 'o--', color='C2', lw=1)
98
+ plt.stem(x, y, linefmt='C2--', markerfmt='C0o', basefmt='C2-')
99
+ # plt.plot(x, y, 'o--', color='C2', lw=1)
99
100
  plt.fill_between(xvals, y_smooth, color='green', alpha=0.3, label='Regla Simpson 1/3')
100
101
  plt.title(r'$\int{f(x)}\approx ' + str(self.integral) + '$')
101
102
  self._graficar_datos()
@@ -96,7 +96,8 @@ class Simpson38(Integral):
96
96
  # Se usa una interpolación cúbica para visualizar las curvas
97
97
  spl = interp1d(x, y, kind='cubic')
98
98
  y_smooth = spl(xvals)
99
- plt.plot(x, y, 'o--', color='C2', lw=1)
99
+ plt.stem(x, y, linefmt='C2--', markerfmt='C0o', basefmt='C2-')
100
+ # plt.plot(x, y, 'o--', color='C2', lw=1)
100
101
  plt.fill_between(xvals, y_smooth, color='green', alpha=0.3, label='Regla Simpson 3/8')
101
102
  plt.title(r'$\int{f(x)}\approx ' + str(self.integral) + '$')
102
103
  self._graficar_datos()
@@ -74,7 +74,8 @@ class TrapezoidalDesigual(Integral):
74
74
  None
75
75
  Muestra una gráfica de Matplotlib.
76
76
  """
77
- plt.plot(self._x, self._y, 'o--', color='C2', lw=1)
77
+ plt.stem(self._x, self._y, linefmt='C2--', markerfmt='C0o', basefmt='C2-')
78
+ # plt.plot(self._x, self._y, 'o--', color='C2', lw=1)
78
79
  plt.fill_between(self._x, self._y, color='green', alpha=0.3, label='Regla del Trapecio Desigual')
79
80
  plt.title(r'$\int{f(x)}\approx ' + str(self.integral) + '$')
80
81
  self._graficar_datos()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mnspy
3
- Version: 0.9.11
3
+ Version: 0.9.13
4
4
  Summary: Paquete didáctico para métodos numéricos
5
5
  Home-page: https://github.com/EdwinSoft/mnspy
6
6
  Author: Edwin Córdoba
@@ -32,12 +32,12 @@ Dynamic: requires-dist
32
32
  Dynamic: requires-python
33
33
  Dynamic: summary
34
34
 
35
- # mnspy
35
+ # mnspy: Métodos Numéricos y Simulación en Python
36
36
 
37
37
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
38
  [![PyPI version](https://badge.fury.io/py/mnspy.svg)](https://badge.fury.io/py/mnspy)
39
39
 
40
- `mnspy` es una biblioteca de Python desarrollada con fines didácticos para facilitar la enseñanza y el aprendizaje de métodos numéricos y simulación a estudiantes de ingeniería.
40
+ `mnspy` es una biblioteca de Python desarrollada con fines didácticos para facilitar la enseñanza y el aprendizaje de métodos numéricos. Fue creada como herramienta de apoyo para la asignatura de **Métodos Numéricos y Simulación** del programa de Ingeniería Mecánica en la **Universidad Pontificia Bolivariana, Seccional Bucaramanga**.
41
41
 
42
42
  La biblioteca implementa algoritmos numéricos fundamentales utilizando un enfoque orientado a objetos, lo que permite una comprensión más clara de los conceptos teóricos y su aplicación práctica. Además, incluye herramientas de visualización para interpretar mejor los resultados.
43
43
 
@@ -56,15 +56,18 @@ Puedes instalar `mnspy` a través de pip:
56
56
  pip install mnspy
57
57
  ```
58
58
 
59
- ## Dependencias
60
- mnspy se basa en varias bibliotecas científicas y de visualización de Python. Las principales dependencias, que se instalan automáticamente, son:
61
- + **`NumPy`** y **`SciPy`**: Para el manejo de arrays, operaciones matriciales y algoritmos numéricos subyacentes.
62
- + **`SymPy`**: Para la manipulación de expresiones simbólicas.
63
- + **`Matplotlib`**: Para la generación de todas las gráficas.
64
- + **`Tabulate`**: Para la presentación de tablas de resultados.
65
- + **`IPython`**: Para la visualización enriquecida en notebooks de Jupyter.
66
- + **`Pandas`**: Para la manipulación de datos.
67
- + **`Gmsh`**: Para la importación de mallas en el módulo de elementos finitos.
59
+
60
+ ## Dependencias
61
+
62
+ `mnspy` se basa en varias bibliotecas científicas y de visualización de Python. Las principales dependencias, que se instalan automáticamente, son:
63
+
64
+ - **`NumPy`** y **`SciPy`**: Para el manejo de arrays, operaciones matriciales y algoritmos numéricos subyacentes.
65
+ - **`SymPy`**: Para la manipulación de expresiones simbólicas.
66
+ - **`Matplotlib`**: Para la generación de todas las gráficas.
67
+ - **`Tabulate`**: Para la presentación de tablas de resultados.
68
+ - **`IPython`**: Para la visualización enriquecida en notebooks de Jupyter.
69
+ - **`Pandas`**: Para la manipulación de datos.
70
+ - **`Gmsh`**: Para la importación de mallas en el módulo de elementos finitos.
68
71
 
69
72
  ## Módulos Disponibles
70
73
 
@@ -85,8 +88,8 @@ La biblioteca se organiza en los siguientes módulos:
85
88
 
86
89
  Para ver ejemplos detallados y cuadernos de Jupyter que demuestran el uso de los diferentes módulos, por favor visita el repositorio público de ejemplos:
87
90
 
88
-
89
91
  [**mnspy_notebooks en GitHub**](https://github.com/EdwinSoft/mnspy_notebooks)
92
+
90
93
  ## Licencia
91
94
 
92
95
  Este proyecto está bajo la Licencia MIT.
@@ -39,12 +39,12 @@ mnspy/ecuaciones_diferenciales_parciales/mvf/volumen_finito.py,sha256=cjIenv-mMD
39
39
  mnspy/integrales/__init__.py,sha256=MRjimTdekdcKPLrpUXCXpFaNwdCPOwuZtNAaLngISe0,1381
40
40
  mnspy/integrales/cuadratura_adaptativa.py,sha256=0G03kp_xX2b84R-VcLF7aZF10Aaf7s-Y7ftFIZCZe1M,3810
41
41
  mnspy/integrales/gauss_legendre.py,sha256=qdgXyNj0UUq7KEC4WdnKvCvD3ZYt1hxObi1WCRBpELg,4042
42
- mnspy/integrales/integral.py,sha256=dxoqpI7BHSf8XV4wYWXqMi1rJQGQ67Q-MFE2k4Vb0NM,2656
43
- mnspy/integrales/romberg.py,sha256=DW28SQe26e10_DlPFz-cM8TyKRTNFmRvvLwvKHinaso,4296
44
- mnspy/integrales/simpson_1_3.py,sha256=kQFJVnuhvs150AbSqWVILPdmvXRAAtSw4zR7vkZb5x8,3435
45
- mnspy/integrales/simpson_3_8.py,sha256=JPMNEhRzCKl2DVUW_CtC2G5daP55BSZg4kX9L7NsGzU,3481
42
+ mnspy/integrales/integral.py,sha256=PD-TxbGUCn7Gt3FaYU9MYySmAJWM5tg4GOXmzHKe72k,2740
43
+ mnspy/integrales/romberg.py,sha256=hkXoDeoq9dQMYeQSHxgmDiHqXAFFnVKMmCkyIa5XejU,4488
44
+ mnspy/integrales/simpson_1_3.py,sha256=R1DnudXbSEk7EJZH-3r2-qjr2zwN0B2c0UO74nlt8CI,3508
45
+ mnspy/integrales/simpson_3_8.py,sha256=0W88mSRsVAdY9ewqXfa5Wc5zk0aBoE9V5yFzGkyg7I8,3554
46
46
  mnspy/integrales/trapezoidal.py,sha256=9ZN5ETPgMcQh0DzXTuTNhub70dfiwHEaiSe92apRf20,2781
47
- mnspy/integrales/trapezoidal_desigual.py,sha256=v06A_5mYRxiO-iu-Pd3gSCAAqV9bkih4ODU424S616Y,2861
47
+ mnspy/integrales/trapezoidal_desigual.py,sha256=RXEUxL-ZFLA6QBCBji8cpXbU2P6Gn8d0cPlUOGPMuhQ,2946
48
48
  mnspy/integrales/trapezoidal_desigual_acumulado.py,sha256=6ASVgbLQ8Xdc7lEYTP3giwgvtgRHvlA8mel1MG42JE0,2967
49
49
  mnspy/interpolación/__init__.py,sha256=YNKs0uI-VhuYM5P3Ut7duVq9N3c7V1qcruYjhMjptQg,1122
50
50
  mnspy/interpolación/inter_Lagrange.py,sha256=BO3MJStYkJaJVmyRmBpfNiPoOGeSMDLI-FBfNhA-DzI,4448
@@ -63,8 +63,8 @@ mnspy/raíces/raices.py,sha256=lTjSOk84sg1VdlElmHaZSRen00zpt0jNrnFBx_SStnU,17510
63
63
  mnspy/raíces/secante.py,sha256=t8-NcN-Ki8BYrh3Cf3VUjaaRLxz6qV1v5i8johKBlZs,5220
64
64
  mnspy/raíces/secante_modificada.py,sha256=0bLgcG8K_O6Ras3vKBIQpUdDlB69tWKHbx_fE8-47SE,5105
65
65
  mnspy/raíces/wegstein.py,sha256=23HQ6QuelMNo8S8W1fzha8ozbcy_NdsjK5XLMaH-m38,5397
66
- mnspy-0.9.11.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
67
- mnspy-0.9.11.dist-info/METADATA,sha256=zD7QrE37o6dMdrqqo4qnzda8quXlnAYM-KA-TweKLho,4439
68
- mnspy-0.9.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
69
- mnspy-0.9.11.dist-info/top_level.txt,sha256=fbooZdZwS41I8vFuAXnn5qL4_mfc1aPt_DM60ZpvtKE,6
70
- mnspy-0.9.11.dist-info/RECORD,,
66
+ mnspy-0.9.13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
67
+ mnspy-0.9.13.dist-info/METADATA,sha256=AYmkYS2MuQYDR_FuOnOS93OKvhDXZwmg0S8q5oxFV9M,4641
68
+ mnspy-0.9.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
69
+ mnspy-0.9.13.dist-info/top_level.txt,sha256=fbooZdZwS41I8vFuAXnn5qL4_mfc1aPt_DM60ZpvtKE,6
70
+ mnspy-0.9.13.dist-info/RECORD,,
File without changes