Skip to main content

A powerful Python mathematics engine for computation and education.

Project description

AxiomPy: The Python Mathematics & Computation Engine

PyPI version License: MIT Python Versions

Author: RK RIAD & RK STUDIO 585
GitHub: rkstudio585


Overview

AxiomPy is a powerful and elegant Python mathematics engine designed for both computation and education. Built from first principles, it provides a vast array of mathematical functionalities, from basic arithmetic to advanced calculus, linear algebra, number theory, and even specialized domains like graph analysis and automatic differentiation.

The core philosophy of AxiomPy is to expose the inner workings of mathematical algorithms. By implementing them from the ground up, it serves not only as a high-performance tool for scientists and developers but also as a valuable educational resource for students and enthusiasts who wish to explore the beauty of mathematics. Its clean, object-oriented design and unified API make complex computations intuitive and straightforward.

Features

  • First-Principle Implementations: Understand the core logic behind the algorithms you use.
  • Comprehensive Functionality: Covers a wide spectrum of mathematical fields:
    • Linear Algebra (Vectors, Matrices, Decompositions)
    • Calculus (Numerical Differentiation & Integration)
    • Number Theory (Primes, CRT)
    • Statistics (Mean, Median, Variance)
    • Graph Theory (PageRank Algorithm)
    • Automatic Differentiation Engine
  • Object-Oriented Design: A clean, organized, and extensible codebase.
  • Unified API: A single, easy-to-use Axiom class provides access to all features.
  • Advanced Data Types: Includes first-class Vector and Matrix objects with full operator overloading for intuitive operations.
  • Zero Dependencies (almost): Relies only on numpy for high-performance array operations, with all mathematical logic built from scratch.
  • ASCII Visualizations: Plot functions and vector fields directly in your terminal.

Installation

You can install AxiomPy directly from PyPI:

pip install axiompy

Usage

Here’s a quick look at how you can use AxiomPy:

from axiompy import Axiom

# --- 1. Intuitive Linear Algebra ---
M = Axiom.Matrix([[1, 2], [3, 4]])
v = Axiom.Vector([5, 6])

# Perform matrix-vector multiplication
Mv = M @ v
print(f"Matrix-vector product: {Mv}")

# Get the determinant
print(f"Determinant of M: {M.determinant}")


# --- 2. Graph Analysis with PageRank ---
g = Axiom.Graph()
g.add_edge('A', 'B'); g.add_edge('A', 'C'); g.add_edge('B', 'C');
g.add_edge('C', 'A'); g.add_edge('D', 'C');

ranks = Axiom.graph_analysis.pagerank(g)
print("\nPageRank Scores:")
for node, rank in ranks.items():
    print(f"  Node '{node}': {rank:.4f}")


# --- 3. ASCII Plotting ---
x_vals = [i * 0.4 for i in range(20)]
y_vals = [val**2 for val in x_vals]

print("\nPlotting y = x^2:")
Axiom.viz.plot_ascii(x_vals, y_vals)

Contributing

Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request on our GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

axiom_math-3.0.0.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

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

axiom_math-3.0.0-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

Details for the file axiom_math-3.0.0.tar.gz.

File metadata

  • Download URL: axiom_math-3.0.0.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for axiom_math-3.0.0.tar.gz
Algorithm Hash digest
SHA256 fa256bc5611e5bb47cc2cbc9f06793c03b411227b9c06a68daae67f210be4e3d
MD5 ba1e30a30d8de27a519ce7575d85d566
BLAKE2b-256 afff9e0c82f839f7d339e7360d3d00222af6b7b9739db3f8f49eca331be5c120

See more details on using hashes here.

File details

Details for the file axiom_math-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: axiom_math-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 88.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for axiom_math-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 853b7f988fdbda22b709a64e0e99236309b6dbbfd71593b114abc45f16523c9c
MD5 6a08cfcbccf38cd31d634d1eb1241fab
BLAKE2b-256 32fd47601b96f5f69f7b1ccf5ff4dfe93b5f694290afc481feb62c8150fbe66e

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