Skip to main content

A matrix operations library developed at African Leadership University

Project description

alumath_kheoml

A Python library for matrix operations developed at African Leadership University. This package provides efficient matrix operations and was created as part of a mathematics and machine learning course.

Installation

You can install the package directly from PyPI:

pip install alumath_kheoml

Usage

Basic Matrix Operations

import numpy as np
from alumath_kheoml import Matrix, matrix_multiply

# Create matrices
A = Matrix(np.array([[1, 2], [3, 4]]))
B = Matrix(np.array([[5, 6], [7, 8]]))

# Matrix multiplication using function
C = matrix_multiply(A.data, B.data)
print(C)

# Matrix multiplication using Matrix class method
D = A.multiply(B)
print(D)

# Matrix multiplication using @ operator
E = A @ B
print(E)

# Transpose
F = A.transpose()
print(F)

Working with Different Matrix Dimensions

import numpy as np
from alumath_kheoml import Matrix

# Create matrices of different dimensions
A = Matrix(np.array([[1, 2, 3], [4, 5, 6]]))  # 2x3
B = Matrix(np.array([[7, 8], [9, 10], [11, 12]]))  # 3x2

# Multiply them
C = A @ B  # Should result in a 2x2 matrix
print(C)

# This will fail due to incompatible dimensions
try:
    D = B @ A
except ValueError as e:
    print(f"Error: {e}")

License

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

Authors

  • Group 4 - ALU Math and Machine Learning Course

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

alumath_kheoml-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

alumath_kheoml-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file alumath_kheoml-0.1.0.tar.gz.

File metadata

  • Download URL: alumath_kheoml-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for alumath_kheoml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 81d4a9aa12b3badcaef6c23e8e5af22667ac7d1e7be2f7fb44e37e828392fd07
MD5 d0a32faf2cb36b631d5d6a2b79c4e3dc
BLAKE2b-256 5eccbdbddcfe9a0324a340db186540a2bffa23c2b84df3dc249293c27878b62d

See more details on using hashes here.

File details

Details for the file alumath_kheoml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: alumath_kheoml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for alumath_kheoml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35caaaad15bdca67e3ea1d9a399137aac880e647b9ccb6d4a530a919258f052a
MD5 7b0c6094d44cd15036ea3915b698685c
BLAKE2b-256 9aff924620b62b71d2a00f073f049f93a97dead2ec50fc43a8527d56547606ef

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