Skip to content

Tensor.StdDev vs TensorPrimitivers.StdDev differences for Complex input #116133

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

Open
lilinus opened this issue May 30, 2025 · 1 comment
Open
Labels
area-System.Numerics.Tensors untriaged New issue has not been triaged by the area owner

Comments

@lilinus
Copy link
Contributor

lilinus commented May 30, 2025

Description

There is a difference on how standard deviation is calculated for Complex numbers.

Reproduction Steps

var arr = new Complex[] { new(1, 2), new(3, 4) };
var tensor = Tensor.Create(arr);
Console.WriteLine(TensorPrimitives.StdDev(arr));
Console.WriteLine(Tensor.StdDev(tensor.AsReadOnlyTensorSpan()));

Expected behavior

Output:

<2,0000000000000004; 0>
<2,0000000000000004; 0>

Actual behavior

Output:

<2,0000000000000004; 0>
<0; 2>

Regression?

No response

Known Workarounds

No response

Configuration

10.0.0-preview.4

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 30, 2025
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 30, 2025
@vcsjones vcsjones added area-System.Numerics.Tensors and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 30, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics-tensors
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Numerics.Tensors untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants