Skip to main content

A matix calculator which performs matrix operations

Project description

mxcalc

this is package for matrix calculations, in this package there are mainly 2 modules,

  1. calculate : contains the functions for calculations
  2. interface : contains helpers and other functions to i/o matrices

available operations

  • addition (any amount of matrices)
  • substraction (any amount of matrices)
  • multiplication (2 matrices)

requirements

  • Python >=3.10

how to use

  1. install by using pip install mxcalc
  2. if ur just using to get results rather than use the functions u can just use mxcalc module itself, an interface made using the functions will be at ur service
  • when you run the module, it will first ask you for a operation, select the operation you wish to perform
  • then you can provide the information the systems ask about the matrices, the you will get your result at the end
mxcalc 
  1. if u want some of the helper functions (to display matrix,get matrix data), u can use the interface module, example show bellow
from mxcalc import interface

interface.displayMatrix(
    [[1],
     [0]]
)
  1. if u want to use the function to input matrices in code and get direct resulting output, u can use the calculate module. simple example given bellow.
from mxcalc import calculate

calculate.matrixMultiplication([
    [[1,0]],
    [[1],
     [2]]
])

All the available functions are mentioned down below in the master table

calculate

Function Parameters Description Returns
matrixAddSub matrices (list), oprt (str) Adds or subtracts an array of matrices based on the operator provided (+ or -). The resulting matrix (list of lists).
matrixMultiplication matrices (list) Multiplies two matrices after checking if their dimensions are compatible. The product matrix, or -1 if dimensions are invalid.

interface

Function Parameters Description Returns
getRowsAndColumns num (int) Prompts user for matrix dimensions with input validation. [rows, cols] or -1 on error.
getMatrix rows (int), columns (int) Collects individual integer values from the user for a specific matrix size. A 2D list (matrix) or -1.
displayMatrix matrix (list), isFinal (bool) Prints a matrix to the console, optionally adding a "Final Matrix" header. None
matrixMultiplicationHelper matrices (list), i (int) Manages the UI flow for collecting and multiplying two matrices. None (displays result).
matrixAddSubHelper matrices (list), oprt (str), i (int) Manages the UI flow for adding/subtracting multiple matrices of the same size. None (displays result).

improvements to make

[ X ] make this a package

currently you can only use this by running main.py and using the helper interfaces provided by that, i feel like making it a package would give it a much better range (inspired by githubs workflow suggestions)

[ ... ] Add more operation

this operations are wayy too common. for example i want to add,

  1. transpose
  2. invertion(obviously)
  3. rotation and maybe flipping ? idk, we'll see

[ ... ] multiple matrix calculations

right now only additions and substraction has unlimited amount of matrices support, idk if this is even possible but if we can do this it'll be fun

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

mxcalc-0.1.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

mxcalc-0.1.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file mxcalc-0.1.4.tar.gz.

File metadata

  • Download URL: mxcalc-0.1.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mxcalc-0.1.4.tar.gz
Algorithm Hash digest
SHA256 67c89652cc9bcd8c877289047a91a47307aad691b978fa2a0c0d937c588c89c4
MD5 56dcbea474a5d553dcf3279d0155dc7a
BLAKE2b-256 91dbd02020eef18a7caa2a4f8250deab6a5f74788228c8ed2815772e11534585

See more details on using hashes here.

File details

Details for the file mxcalc-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: mxcalc-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mxcalc-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6cfb149f3ee93391e4a8af8d6fa924ca7d6899f79c0e3339c21d17d59cf027b6
MD5 0c4b8d3fcddf8bbb2a06607905b6ea97
BLAKE2b-256 729279bb3bc8329f2dee97bda6dc54fb178bf5a5fefe8e0eef9dfc5615067b3e

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