Skip to main content

A general purpose Python math module

Project description

Build Status Documentation Status PyPI version fury.io PyPI license PyPI pyversions Downloads per month

LibPyMath

A fast, general purpose Python math library


Install

Run pip install libpymath to dowload and install libpymath for your operating system and python version. There are also wheels provided for many of the latest Python versions on Windows, Mac OS and Linux thanks to the cibuildwheel project.


Features and usage

Matrix math

Easily create, manipulate and perform calculations with dense matrices. The matrices themselves are stored and manipulated with optimised C code, resulting in faster operations and more efficient calculations.

The matrix library is currently very primitive and supports very few operations, though is constantly being expanded on and improved. Many ease of use features also exist, such as the ability to format and print a matrix, alligning the decimal points (if present) and providing brackets in the relevant places.

For example, the following creates a new matrix from a 2d list of data

# Import the Matrix object from the matrix library
from libpymath.matrix import Matrix

# Create the data
matrixData = [[1, 2, 3],
              [4, 5, 6],
              [7, 8, 9]]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[1.0, 2.0, 3.0]
     [4.0, 5.0, 6.0]
     [7.0, 8.0, 9.0]]

Here is another example to show the formating abilities of libpymath's matrix type. The decimal points, commas and brackets are all alined on a per-row basis, saving space and producing a nicer result.

# Create the data
matrixData = [[1, 2, 3.14159],
              [4, 5000, 6],
              [7, 8, 9]]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[1.0,    2.0, 3.14159]
     [4.0, 5000.0, 6.0    ]
     [7.0,    8.0, 9.0    ]]

The example below shows what happens when printing a large matrix, as the entire thing could not fit on the screen -- libpymath shows only the corners, missing out the middle section of the matrix on both the x and y axis, allowing large matrices to be printed quickly and using a small amount of space.

# Create the data for a 1000x1000 matrix
rows = 1000
cols = 1000
matrixData = [[j + i * cols for j in range(rows)] for i in range(cols)]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[     0.0,      1.0,      2.0  ***     997.0,    998.0,    999.0]
     [  1000.0,   1001.0,   1002.0  ***    1997.0,   1998.0,   1999.0]
     [  2000.0,   2001.0,   2002.0  ***    2997.0,   2998.0,   2999.0]
           ***       ***       ***            ***       ***       ***  
     [997000.0, 997001.0, 997002.0  ***  997997.0, 997998.0, 997999.0]
     [998000.0, 998001.0, 998002.0  ***  998997.0, 998998.0, 998999.0]
     [999000.0, 999001.0, 999002.0  ***  999997.0, 999998.0, 999999.0]]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libpymath-0.1.5.tar.gz (15.1 kB view details)

Uploaded Source

Built Distributions

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

libpymath-0.1.5-cp38-cp38-manylinux1_x86_64.whl (70.5 kB view details)

Uploaded CPython 3.8

libpymath-0.1.5-cp38-cp38-manylinux1_i686.whl (72.0 kB view details)

Uploaded CPython 3.8

libpymath-0.1.5-cp37-cp37m-manylinux1_x86_64.whl (69.6 kB view details)

Uploaded CPython 3.7m

libpymath-0.1.5-cp37-cp37m-manylinux1_i686.whl (71.1 kB view details)

Uploaded CPython 3.7m

libpymath-0.1.5-cp36-cp36m-manylinux1_x86_64.whl (69.5 kB view details)

Uploaded CPython 3.6m

libpymath-0.1.5-cp36-cp36m-manylinux1_i686.whl (71.1 kB view details)

Uploaded CPython 3.6m

libpymath-0.1.5-cp35-cp35m-manylinux1_x86_64.whl (69.5 kB view details)

Uploaded CPython 3.5m

libpymath-0.1.5-cp35-cp35m-manylinux1_i686.whl (71.1 kB view details)

Uploaded CPython 3.5m

File details

Details for the file libpymath-0.1.5.tar.gz.

File metadata

  • Download URL: libpymath-0.1.5.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for libpymath-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1bc5db7a4c2af60999a53f0458d12cc3abf5f12465d11b050c8799a25f24b792
MD5 1452bfc93d5320e6d3b6abf2a60dc5e3
BLAKE2b-256 cf44057052880e3e7c747bf3cf8ddb663b847f37b9993f5d55bb9ce3f32c21fd

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 70.5 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5430cae774c3a3e8cef68a939fc85d6423944cf3af48a5ad49355e8c6a35c28e
MD5 9d12ea82a74e7f077ffbb4fc33fbe112
BLAKE2b-256 6c86d33034c5f5d8ad78b172e9146318462444550abcfd94fcc64aa915ee7c98

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 72.0 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a5f499ae64a4c64255fd4a0ee16d16755d1a656c3e2c3d75bc4c2bfdcc61f278
MD5 5cdac5efae649c8330af081439d3ef53
BLAKE2b-256 582b99ab4be7b17ea166bd64d0a2e6e26a489dc50b3a559d9bc73a71a7060021

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 69.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b6d33640091dbbb7086a4c7622d5f79423a8c73ad928f64a75866685902139f6
MD5 21201154f0341a5c58ecaf04842691a8
BLAKE2b-256 84cbed481a3d90514eb62cd39271c15a1a62d0f04c4e6fc8ba94a2256e561280

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2d399a9c1085f0ad99a55ff8ba375578071e5a53ba1036de605a33a4ca965a49
MD5 c8f8e217e491733efbbd5861b0409f41
BLAKE2b-256 c9c685334e2bf2bedf46f8dabcf7f11b9b3eed7b2da2a01f2cf86ea61e71bfd3

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 50380a29c9e27959260f9e985fb41d8f7ce63c9f829d0ec1bad5fb384fed594d
MD5 b1d59f0c796335d5be6bfaa28bd0254f
BLAKE2b-256 218efbaea93f11c2b3555980594e8ed4b9a56ab8b366dba4b7617c1d54f191a3

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 10c69f71e15d071c02f9306dcd7a81582e31a4b7d3f78b923979d25b0c1c580f
MD5 54226c23f3d7a04f02e5bc5df767ec9a
BLAKE2b-256 560a394571cc131e949bfde11bb33cdb894e573f34bc8159fa3fb7837c52073a

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b4d26d411f456f8d6505c33aa1cede4cd1547efe6324efaf87d4502b8464ce5e
MD5 fe1824762ec5f5baf6c44c0dbd83bc93
BLAKE2b-256 0efc422f9b41fdc14e5a891b272f524822efcad4d01c613c9a20102ef937a4bc

See more details on using hashes here.

File details

Details for the file libpymath-0.1.5-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.1.5-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for libpymath-0.1.5-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 fb35d8b0047d25d2a970ea8513cfd9b44b8cf3128703fc00aee1a38de4790130
MD5 59a6a6c45077d1272abe30f9241ba224
BLAKE2b-256 fbfe6d236c1bf0b674d6f1fbf4bfd3d4b51d2453aba2c4085712e2c7a306f185

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