sandialabs / pyttb

Python Tensor Toolbox
https://pyttb.readthedocs.io
BSD 2-Clause "Simplified" License
25 stars 13 forks source link

`ttv` return value type consistency #272

Closed dmdunla closed 1 year ago

dmdunla commented 1 year ago

Currently, we have the following output types for ttv in the various data classes:

- ktensor.ttv -> Union[float, ktensor]
- tensor.ttv -> tensor
- sptensor.ttv -> Union[sptensor, ttb.tensor]
- ttensor.ttv -> Union[float, ttensor]

All should support float and I think they do. But this should be verified and the type hints should be updated to include float across all.