Closed ntjohnson1 closed 7 months ago
Additional topics to cover from the tutorials:
We want to update sptenmat similarly to match
Right now our tenmat construction is a little bit of a mess. I suspect we are hitting some weirdness related to fortran layouts again.
from_data
actually creates a tensor
then calls from_tensor
as our base case. This is needed because from_tensor
actually reshapes the matrix into the original tensor size then reflattens it which seems like it shouldn't be necessary (but we get a variety of failures if we skip that step).
Ok. I figured out the decoupling. Currently from_data increased the scope from Matlab to accept any data that could be coerced into the correct shape instead of a matrix that can be unwrapped into a tensor. I should hopefully have a cleaned up version in the next few days.
Follow up to
145
213
Follow changes from #182 for
ktensor
as a guide.Constructors:
__init__
: (replacesfrom_data
, adds copy parameter)from_tensor_type
from_data
Add methods:
copy
__deepcopy__