Add `item` for Tensor
Tensor should support the numpy-like function item, which converts a size-1 Tensor into a Python scalar.
May i work on this issue?
Sure, sounds great!
Actually I am new to GitHub. I have forked the issue and cloned it to my pc. Can u please guide me how to edit the code?
Hey @Sanchayan-Bhowal, thanks for your contribution!
The workflow is as follows:
- create a fork of the TensorNetwork repository
- locally clone the fork to your computer:
-
$ git clone <your fork>
-
- create a new branch for your PR:
$ git checkout -b <my PR branch> master - fetch latest changes:
-
$ git fetch upstream -
$ git merge upstream/master
-
- add your changes to the code
- commit and publish your changes:
-
$ git commit -a(commits all changes in a single commit, usually not ideal) -
$ git push
-
- on the gitub page of your fork, select Pull Request at the top, and submit a new PR
@mganahl Thank you so much I will try to fix this issue as soon as possible
@alewis I have generated a pull request and added a function please check it out