Skip to content

Commit

Permalink
Create test_math.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Dec 6, 2022
1 parent 57717b2 commit 8b007c4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_math.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import tensortrax as tr
import tensortrax.math as tm
import numpy as np


def test_math():

F = np.ones((3, 3))
T = tr.Tensor(F)

assert isinstance(F @ T, tr.Tensor)
assert isinstance(T @ F, tr.Tensor)
assert isinstance(T * F, tr.Tensor)
assert isinstance(F * T, tr.Tensor)

assert isinstance(F / T, tr.Tensor)
assert isinstance(F * T, tr.Tensor)


if __name__ == "__main__":
test_math()

0 comments on commit 8b007c4

Please sign in to comment.