Skip to main content

A package for numerical methods in Python

Project description

Numerical Methods Repository

Package developed for Universidad del Norte, focused on the Engineering Division. Supervised by professors Augusto Salazar and Marlon Piñeres.

Check out the official repositor: https://github.com/LCCastillo03/NumericalMethods/tree/main

Team: NRC 2381

  • Lena Carolina Castillo De la Espriella
  • Gabriela De Jesús Bula Pavia
  • Edgar Andrés Garcia Davila

Table of Contents

Summary and Justification

This repository contains implementations of numerical methods in Python. The included methods are useful for solving mathematical problems using computational techniques. They are used to build the marlonpy Python package, which aims to help Systems Engineering students at Universidad del Norte, especially in their Computational Solutions to Engineering Problems course.

Repository Contents

This repository currently includes implementations of the following methods:

  • Number Conversions: Binary to Decimal, IEEE 754.
  • Root-Finding Methods: Includes Bisection, Fixed Point, Newton-Raphson, Regula Falsi, and Secant methods.
  • Linear Regression: Techniques for modeling relationships between variables.
  • Numerical Differentiation: Methods for approximating derivatives.
  • Numerical Integration: Techniques such as the Trapezoidal Rule, Gauss-Legendre, and Simpson's rule.
  • Differential Equation Solvers: Includes methods like Runge-Kutta.

Repository Structure

The repository is structured as follows:

  1. Conversions:

    • /ConversionBinary.py
    • /ConversionIEEE754.py
  2. Differential Equations:

    • /RungeKutta4th.py
  3. Linear Regression:

    • /LinearRegression.py
  4. Numerical Derivation:

    • /Derivative.py
  5. Numerical Integration:

    • /GaussLegendre.py
    • /Simpson38.py
    • /TrapezoidalRule.py
  6. Roots:

    • /BisectionMethod.py
    • /FixedPoint.py
    • /NewtonRaphson.py
    • /RegulaFalsi.py
    • /SecantMethod.py
  7. System Equations:

    • /Crout.py
    • /DDM.py
    • /Doolittle.py
    • /GaussSeidel.py
    • /Jacobi.py
  8. Taylor Series:

    • /TaylorSeries.py

Each directory contains specific implementations of the mentioned methods.

Dependencies

  • NumPy: the fundamental package for scientific computing in Python.
  • SymPy: a Python library for symbolic mathematics.
  • tabulate: Pretty-print tabular data in Python.

Installation and Usage Instructions

Latest version of Python 3.12.3

pip install marlonpy

If the command pip does not work in your computer, please try:

py -m pip install marlonpy

Now, you can use the library.

import marlonpy as mp

Examples

  • IEEE 754 Conversion:
>>> from marlonpy.Conversions import ConversionIeee
>>> num = '01000010101010100100000000000000'
>>> print('El equivalente de num en decimal es', ConversionIeee.ieee754(num))
El equivalente de num en decimal es 85.125
  • Regula Falsi:
>>> from marlonpy.Roots import RegulaFalsi
>>> import sympy as sp
>>> x = sp.Symbol('x')
>>> f = sp.sec(sp.exp(sp.sqrt(x + 1))) - 3
>>> a = 3
>>> b = 3.1
>>> print('La raíz aproximada es', RegulaFalsi.regula_falsi(f, a, b))
La raíz aproximada es 3.06741643635292

License

This repository is licensed under the MIT License.

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

marlonpy-1.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

marlonpy-1.2.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file marlonpy-1.2.0.tar.gz.

File metadata

  • Download URL: marlonpy-1.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for marlonpy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b1e3248005c7355e4bf56852ff6c3c8f3a09834a70783fa205e487bac86e4852
MD5 59f04435544c23192796969271e7bb40
BLAKE2b-256 e7442620d2afca0b11b8d59920cd93c46eafed488e72ce002393164d9d5956b2

See more details on using hashes here.

File details

Details for the file marlonpy-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: marlonpy-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for marlonpy-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f60290ef0ed2ab52f16db1e8f0254bc6add823c08c1b103b74d1dcb32f4de61e
MD5 ff1ec4b7a006a3ebafb7ed07ac7c3705
BLAKE2b-256 c153ac0af21ebb7878b28aac5ef28919b7dce6eb7ab926750ee0c07ff0802ba3

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