Extension module for matrix multiplication
Project description
LanaBLAS 🐑
Linear Algebra for nocturnal and adventurous data scientists exploring BLAS
LanaBLAS is a repository primarily used for testing the development of CPython extension modules with external dependencies, such as (OpenBLAS). It's a work-in-progress memetic project aimed at having fun and learning new things.
Install
brew update
brew install openblas
export BLA_VENDOR=OpenBLAS
pip install lanablas==0.1.7
Example
from lanablas import Matrix, inject
a = Matrix.ones(3,3)
print(a)
print(type(a), a.shape)
b = Matrix.eye(3)
print(b)
print(type(b), b.shape)
c = a + b
print(c)
print(type(c), b.shape)
for row in c.tolist():
print(row, type(row))
# sub-matrix
d = Matrix.new(inject(c.tolist()[0]))
print(type(d), d.shape)
For more comprehensive examples, please visit the examples folder.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lanablas-0.1.7.tar.gz.
File metadata
- Download URL: lanablas-0.1.7.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8eac7e97c809b5d27ff2ac18a7417781439a13f2fc656f7c20e12a2fda7e0b1
|
|
| MD5 |
8dc63c5823e17193675c9b7c9fd91272
|
|
| BLAKE2b-256 |
995c88b3260173805c124224860e0146c948e534198b3840b55ad3ead21b0ef1
|
File details
Details for the file lanablas-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: lanablas-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.3 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d7e00c7f95e99fdacd0e40f3ffd9711b34b71111bf79a9dcb4680d75491568b
|
|
| MD5 |
543b445e1179cff8ce37369a572bef21
|
|
| BLAKE2b-256 |
56b1fd61cea6aed4539bdfc58dc392edae8f4c970c101cd7084e638e20dce908
|