-
Notifications
You must be signed in to change notification settings - Fork 13
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
cytnx.random.normal()
and cytnx.random.uniform()
do not work
#456
Comments
Hi, the first argument for non-inplace version should be the shape of the output tensor(or Number of elements, if the desired output is 1-D Tensor). |
Then this means that the syntax for inplace and non-inplace version is very different, which can be confusing. |
If I have a UniTensor |
It seems that non-inplace version only output
If I would like to add some noise to an existing UniTensor I have to do something like this
but we don't really need to clone the UniTensor. It would be useful to have something like
and only metadata of uT is used. |
cytnx.random.norma()
and cytnx.random.uniform()
do not workcytnx.random.normal()
and cytnx.random.uniform()
do not work
To get this behavior, we probably need a We can always add another API to address this adding element-wise noise behavior by wrapping @pcchen's example code. |
I am ok with using |
I was going to suggest something like
following NumPy syntax. That could also distinguish between a Tensor and a UniTensor. By the way, I asked ChatGPT about the differences between a Tensor and a UniTensor in cytnx and it gave a pretty good answer! |
For
cytnx.random
, in place version works:But following codes will results in error
The text was updated successfully, but these errors were encountered: