-
Notifications
You must be signed in to change notification settings - Fork 14
145 add support for constructing from data without copying (ktensor) #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
145 add support for constructing from data without copying (ktensor) #182
Conversation
…data, from_factor_matrices. Adding flag to __init_ to specify if a copy of the provided input data will be copied or not.
…Cleaning up testing.
The following methods currently return a copy make a copy of the ktensor:
The following methods alter the underlying data members and do not make a copy:
Is this what we want? Which should be in-place (no copy) and which should make copies? |
…ensor.copy() causes a typing error. Can you take a look?
@ntjohnson1 Please review changes to |
We originally decided to match MATLAB's in-place vs copy choice. We are consistent with the methods you listed. Returns copy In-place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. A few NITs you can address at your discretion. Always a fan of smaller PRs, my vote would be to merge this then open a second PR for tensor since the changes should be aligned in spirit but I doubt the implementation overlaps.
… switch to using copy() instead of a constructor.
Will finalize this PR to address @ntjohnson1 Would you suggest breaking up #145 or just submitting several PRs for the individual classes? |
Whatever you think is most obvious. No strong preference. I mostly just wanted this to land today since I branched off it to start in on ktensor linting and typing here (finished linting and halfway through typing). |
Addresses the
ktensor
part of:📚 Documentation preview 📚: https://pyttb--182.org.readthedocs.build/en/182/