sandialabs / pyttb

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

Nick/tenmat constructors #293

Closed ntjohnson1 closed 7 months ago

ntjohnson1 commented 10 months ago

Resolves: https://github.com/sandialabs/pyttb/issues/214 but not the full documentation task since I ran out of steam.

Sptenmat is pretty straightforward based on our other constructors. Tenmat was complicated because we had expanded it to take in ANY array regardless of layout and we would try to reshape it for the end user. I constrained it to taking data that is already matricized correctly. My expectation is most people will generate a tenmat from an existing tensors as an intermediate for some operation rather than directly.

I also fixed the dimension inference here and provided an example https://github.com/sandialabs/pyttb/issues/102#issuecomment-1851119245.


📚 Documentation preview 📚: https://pyttb--293.org.readthedocs.build/en/293/