Skip to main content

linear algebra

Project description

#懒得搞标题了

不是?!

是谁给我加的标题?!

(无人在意)

话归正传,该介绍模块了

这个模块讲的是线性代数

如果你在使用过程中引发 FloatingPointError 属于正常现象,因为我恶趣味的把所有错误改成了 FloatingPointError (奸笑)

核心功能

1、二维向量(Vector2D 类)

初始化:通过 Vector(x, y) 创建二维向量

基本运算:支持加减(向量间)、乘除(与标量)、模长计算(mode()/abs)、归一化(normalize())等

比较运算:基于向量模长进行大小比较(</<=/>/>=),支持相等性判断(==/!=)

辅助方法:提供 ceil()/floor() 取整、迭代器(可直接解包为 x, y)等功能

常量定义:base_vector_2D_i((1,0))和 base_vector_2D_j((0,1))作为二维基向量

2、二维矩阵(Matrix2D 类)

初始化:通过两个二维向量创建 2x2 矩阵,默认初始化为单位矩阵

核心运算:支持矩阵乘法(mul)、行列式计算(det())、转置(transpose())等

比较运算:基于行列式值进行大小比较和相等性判断

构造函数:支持通过两个向量或四个数字元组创建矩阵

3、三维向量(Vector3D 类)

初始化:通过 Vector3D(x, y, z) 创建三维向量

功能:类似二维向量,扩展至三维空间,支持三维向量的加减、标量乘除、模长、归一化等

常量定义:base_vector_3D_i((1,0,0))、base_vector_3D_j((0,1,0))、base_vector_3D_k((0,0,1))作为三维基向量

4、三维矩阵(Matrix3D 类)

初始化:通过三个三维向量创建 3x3 矩阵,默认初始化为单位矩阵

核心运算:支持矩阵乘法、行列式计算(det())、转置(transpose())等

构造函数:支持通过三个向量或九个数字元组创建矩阵

5、其他矩阵

(其实差不多)

6、工具函数

呃呃呃,还是自己看吧(lazy:))

6、注意事项

(无)

作者只是中学生,部分技能未解锁,please多多支持!!!!!!!!

It is in Chinese.(coding: UTF-8)

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

linear_algebra_new-0.0rc2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

linear_algebra_new-0.0rc2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file linear_algebra_new-0.0rc2.tar.gz.

File metadata

  • Download URL: linear_algebra_new-0.0rc2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.0rc1

File hashes

Hashes for linear_algebra_new-0.0rc2.tar.gz
Algorithm Hash digest
SHA256 83b428aa33456194ed77d8fc454d7b7950fd2af5a98b3e1d69802d35154947fd
MD5 0a2db7f8eaa2c04ac15acdbaea5a1fb2
BLAKE2b-256 0b369a7a942466e3e3109bb31f260dc25f106cfb2a5d5b49d61a649404278e50

See more details on using hashes here.

File details

Details for the file linear_algebra_new-0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for linear_algebra_new-0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ee3798d4e52118bebff65747551a416df25a960bf45412de965dcd23a6f3f40
MD5 81d3955262e0d378bf74d9404dcd673a
BLAKE2b-256 7b6b01c672c8f52b0a8bc7f59abda118b67f7a6ce1ddd9a28b61204378e07834

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