Skip to main content

Matrix

This is a Module which can perform Matrix Functions.


Table of Contents

You're sections headers will be used to reference location of destination.


Description

Matrix can be Created using 2D Arrays (Lists in Python), but Complex Functions like Determinant(N X N), Inverse, Matrix Arithmetic Operations ... is Required. I hope this Module can save your time and effort as well as provide you with some consistency across your Matrix Journey.

Back To The Top


Functions-Methods

Methods List

init(self,r,c)

This method of the Class will initialize the class by creating a matrix A(r,c). And will create the matrix. All elements will be 0.

obj=Matrix(3,3)

list(self)

This method of the Class will return the 2-D list.

lst99 = obj.list()

inputAdd(self)

This Method of the Class will change the elements of the Matrix by User Input.

obj.inputAdd()

listTomatrix(self, lst:list)

This method of the Class converts the List Parameter to Matrix (self.matrix).

obj.listTomatrix([1,2,3,4,5,6,7,8,9])

printMatrix(self)

This Method prints the Matrix using Tabulate Module.

obj.printMatrix()

transpose(self)

This Method Returns a Transpose of the Matrix (self.matrix).

Return Type -> Matrix

obj2 = obj.transpose()

sizeMatrix(self)

This Method returns the Dimensions of the Matrix.

Return Type -> Tuple

tuple1 = obj.sizeMatrix()

matrixMultiplicationConstant(self, int1 : int OR float)

This Method multiplies the Original Matrix with the Constant (int1).

A = A * c

obj.matrixMultiplicationConstant(5)

adj(self)

This Method returns the Adjoint of the Original Matrix.

Return Type - Matrix

obj5 = obj.adj()

inverse(self)

This Method returns the Inverse of the Original Matrix.

Return Type -> Matrix

obj6 = obj.inverse()

mean(self)

This Method returns the mean of the Original Matrix.

Return Type -> Float

float1 = obj.mean()

rowMeans(self)

This Method returns the mean of all rows of the Original Matrix.

Return Type -> Matrix

obj7 = obj.rowMeans()

colMeans(self)

This Method returns the mean of all columns of the Original Matrix.

Return Type -> Matrix

obj8 = obj.colMeans()

rowSum(self)

This Method returns the sum of all rows of the Original Matrix.

Return Type -> Matrix

obj9 = obj.colMeans()

colSum(self)

This Method returns the sum of all columns of the Original Matrix.

Return Type -> Matrix

obj10 = obj.colSum()

sum(self)

This Method returns the sum of all elements of the Matrix.

Return Type -> Float/Int

var = obj.sum()

orthogonalCheck(self)

This Method returns 1, if the Matrix is orthogonal and 0 if it is not.

Return Type -> Int

var = obj.orthogonalCheck()

trace(self)

This Method returns the sum of all diagonal elements of the Matrix.

Return Type -> Int/Float

var2 = obj.trace()

flatten(self)

This Method returns 1D list containing all elements, Row-Wise.

Return Type -> List

var2 = obj.flatten()

Functions List

matDiv(m1:Matrix, m2:Matrix)

This Method returns the Result of the Multiplication of 2 Matrices. Both Matrices are the Parameter Matrices, First is the Numerator Matrix and other is the Denominator Matrix (for which the inverse is calculated).

Return Type -> Matrix

C = A * B^-1

obj11 = obj.matDiv(obj, obj2)

matMul(m1:Matrix, m2:Matrix)

This method returns the Result of the Multiplication of 2 Matrices.

Return Type -> Matrix

C = A x B

obj3 = matMul(obj1, obj2)

matSum(m1:Matrix, m2:Matrix)

This Method returns the Result of the Addition of 2 Matrices. Return Type -> Matrix

C = A + B

obj4 = matSum(obj, obj2)

matSub(m1:Matrix, m2:Matrix)

This Method returns the Result of the Subtraction of 2 Matrices.

Return Type -> Matrix

C = A - B

obj4 = matSub(obj, obj2)

diag(m1 : Matrix OR List)

This Function returns the Diagonal Matrix if the parameter is a List, And Returns the List of all the Diagonal Elements of the Matrix if the parameter is a Matrix.

Return Type -> Matrix/List

list1 = diag(obj) OR obj12 = diag([1,2,3,4,5,6])

identity(m1:Matrix)

This Function returns an Identity Matrix.

obj13 = identity(obj)

determinant(m1:Matrix)

This Function returns the Deteminant of a Matrix (N x N).

Return Type -> Float/Int

det12 = determinant(obj)

Back To The Top


Author Info

Back To The Top

Metadata

Release files for scitrix 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scitrix 0.1.3
File Size Uploaded Provenance
scitrix-0.1.3.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for scitrix 0.1.3
File Interpreter ABI Platform
scitrix-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / scitrix-0.1.3.tar.gz

Download URL scitrix-0.1.3.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f54e06b635e48b0b0a5984e5b5812175d864ad065a24fea0d7567fdacf4603
BLAKE2b-256 checksum
How to use checksums
bf43cfdba31999a98063fddc4170660d4a77e682fa1b9f8d1302b7182a5c3aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.3

Release files / scitrix-0.1.3-py3-none-any.whl

Download URL scitrix-0.1.3-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a24d54c868385487bb1c256c3c606146361bddf67ed96b977037b8ef0d30abec
BLAKE2b-256 checksum
How to use checksums
e582bd6cc581959694243b861c04eab70c0d457a1320e39f1f6d584009e9cb5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.3

Security for scitrix 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page