Skip to content

Add clone function. - #43

Merged
hzhangxyz merged 2 commits into
mainfrom
dev/add-clone-function
Aug 9, 2025
Merged

Add clone function.#43
hzhangxyz merged 2 commits into
mainfrom
dev/add-clone-function

Conversation

@hzhangxyz

Copy link
Copy Markdown
Member

No description provided.

@hzhangxyz
hzhangxyz requested a review from Copilot August 8, 2025 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a clone function to the GrassmannTensor class to create deep copies of tensor instances, along with support for Python's copy module through __copy__ and __deepcopy__ methods.

  • Implements a clone() method that creates a deep copy using dataclasses.replace()
  • Adds __copy__() and __deepcopy__() methods to integrate with Python's copy module
  • Ensures all tensor components (_tensor, _parity, _mask) are properly cloned

Comment thread grassmann_tensor/tensor.py
@codecov

codecov Bot commented Aug 8, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hzhangxyz
hzhangxyz force-pushed the dev/add-clone-function branch from a1ba1ae to 40862f0 Compare August 8, 2025 16:13
@hzhangxyz
hzhangxyz merged commit 536ccf9 into main Aug 9, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants