Skip to content

Commit

Permalink
TensorTruthValue -> TTruthValue
Browse files Browse the repository at this point in the history
  • Loading branch information
noskill committed Apr 17, 2019
1 parent 1842367 commit bb6e375
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/cython/atomspace/test_tensortv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from opencog.atomspace import TensorTruthValue
from torch import tensor
import torch
TTruthValue = TensorTruthValue
except ImportError as e:
print("torch not found")
torch_found = False
Expand All @@ -26,11 +25,11 @@ def setUp(self):
def test_tv(self):
if not torch_found:
return
v = TTruthValue(0.4, 0.5)
v = TensorTruthValue(0.4, 0.5)
delta = 0.0000001
self.assertTrue(float(v.mean) - 0.4 < delta)
self.assertTrue(float(v.confidence) - 0.5 < delta)
self.assertTrue(isinstance(eval(str(v)), TTruthValue))
self.assertTrue(isinstance(eval(str(v)), TensorTruthValue))

c = ConceptNode('c')
c.tv = v
Expand Down

0 comments on commit bb6e375

Please sign in to comment.