Skip to content

marcosalvalaggio/lana-blas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LanaBLAS 🐑

maintenance-status Tests Passing macOS

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.

About

A Python C-API-based Experimental Linear Algebra library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published