Open dmdunla opened 10 months ago
Although #269 fixed the output for logical_* methods, the comparison operators in sptensor currently output float values and not bool values.
logical_*
sptensor
float
bool
For consistency with other tensor classes and the logical_* methods, this should change to outputting bool values.
>>> import pyttb as ttb >>> import numpy as np >>> S = ttb.sptensor(shape=(2,2)) >>> S[1,1] = 1.0 >>> S > 0 sparse tensor of shape (2, 2) with 1 nonzeros [1, 1] = 1.0 >>> S >= 0 sparse tensor of shape (2, 2) with 4 nonzeros [1, 1] = 1.0 [0, 0] = 1.0 [0, 1] = 1.0 [1, 0] = 1.0
Although #269 fixed the output for
logical_*
methods, the comparison operators insptensor
currently outputfloat
values and notbool
values.For consistency with other tensor classes and the
logical_*
methods, this should change to outputtingbool
values.