Skip to content

fmokadem/Tensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Tensor

A basic tensor class (~numpy like)

Usage

from tensor import Tensor

t = Tensor([[1, 2], [3, 4]])
t = Tensor([1, 2, 3, 4], shape=(2, 2))
t = Tensor(shape=(3, 5))

Operations like elt-wise add (+), mult (*), matmul (@), indexing ([]), and reshaping (.reshape()) work (~) similarly to NumPy arrays, with broadcasting and shape infer support

See test_tensor.py for examples.

About

Simple Tensor class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages