Tools for working with matrices and vectors.
Project description
This module contains some tools for linear algebra. It contanis classes
to define matrices and vectors, and a number of functions for working
on those matrices and vectors. It is intended for mathematical and
scientific use. It saved me a lot of time in a linear algebra class.
classes:
vector
matrix: two-dimensional collection stored in row-major order
functions:
AxApproxB: solves Ax approximately equal to b; for use when the rows of
matrix b are not in the column space of A
axpy: ax+y where a is a scalar, and x and y are vectors
bestfit: used to find a line of best fit from given points
colVec: makes a matrix with one column
det: returns the determinant of a square matrix. Can return a cross
product if the top row contains the unit vectors.
dot: returns the dot product of two vectors
GaussJordan: solves AX=B, where matrices A and B are known and X is
returned. If B is not in the column-space of A, use AxApproxB.
identityMatrix: makes an identity matrix of a given size
linearCombination: returns a linear combination based on a list of scalars
and a list of vectors
mmMult: matrix-matrix multiplication
mvMult: matrix-vector multiplication
rowVec: makes a matrix with one row
transpose: transposes a matrix
v: wrapper around vector instantiation
zeroMatrix: makes a zero matrix of a given size
zeroVector: makes a zero vector of a given size
Help can be obtained by using:
>>>help(<function or class>)
to define matrices and vectors, and a number of functions for working
on those matrices and vectors. It is intended for mathematical and
scientific use. It saved me a lot of time in a linear algebra class.
classes:
vector
matrix: two-dimensional collection stored in row-major order
functions:
AxApproxB: solves Ax approximately equal to b; for use when the rows of
matrix b are not in the column space of A
axpy: ax+y where a is a scalar, and x and y are vectors
bestfit: used to find a line of best fit from given points
colVec: makes a matrix with one column
det: returns the determinant of a square matrix. Can return a cross
product if the top row contains the unit vectors.
dot: returns the dot product of two vectors
GaussJordan: solves AX=B, where matrices A and B are known and X is
returned. If B is not in the column-space of A, use AxApproxB.
identityMatrix: makes an identity matrix of a given size
linearCombination: returns a linear combination based on a list of scalars
and a list of vectors
mmMult: matrix-matrix multiplication
mvMult: matrix-vector multiplication
rowVec: makes a matrix with one row
transpose: transposes a matrix
v: wrapper around vector instantiation
zeroMatrix: makes a zero matrix of a given size
zeroVector: makes a zero vector of a given size
Help can be obtained by using:
>>>help(<function or class>)
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
LinearAlgebra-1.0.0.tar.gz
(4.1 kB
view hashes)