Skip to main content

A matrix operations library developed by alumath_kheoml group at African Leadership University

Project description

alumath_kheoml

A Python library for matrix operations developed at African Leadership University. This package provides matrix operations and was created as part of a 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}")

Authors

  • Group 4 [kheoML] - ALU ML 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.1.tar.gz (3.3 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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alumath_kheoml-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 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.1.tar.gz
Algorithm Hash digest
SHA256 3070fd5cf4dad19aa216c693beb9d16739995eac1cd91a79d2cbe6ee46e23c03
MD5 1510e2f393dea8960c448101a5603008
BLAKE2b-256 224d5e104d606880d97e4f2c0733a5c7d345bf1543a13d6b04ff57d52a36d10f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alumath_kheoml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9be543fbd250d0cc4e5bc2043f96aa4d943f9e72893e744139b58a791386e37
MD5 33f16e18d09ab973d7fa5e6c3940f2a7
BLAKE2b-256 bf85f0097e53b44f930eed312533fb63d9691958e85eccca2e9a169379470677

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