You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TryFlattenTo and TryBroadcastTo throw when destination is too short, TryCopyTo returns false.
Reproduction Steps
using System.Diagnostics.CodeAnalysis;using System.Numerics.Tensors;namespace ConsoleApp1;publicabstractclassProgram{[Experimental("SYSLIB5001")]publicstaticvoidMain(){newTensorSpan<double>(newdouble[1]).TryCopyTo(Array.Empty<double>());newTensorSpan<double>(newdouble[1]).TryFlattenTo(Array.Empty<double>());}}
Expected behavior
Return false; never throw.
Actual behavior
ArgumentException
Regression?
No response
Known Workarounds
No response
Configuration
.Net8, Ubuntu22, x64
Other information
No response
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.
soerenwolfers
changed the title
System.Numerics.Tensors Inconsistent TryFlattenTo&TryBroadcastTo vs TryCopyTo
System.Numerics.Tensors Inconsistent TryFlattenTo & TryBroadcastTo vs TryCopyTo
Aug 16, 2024
Description
TryFlattenTo and TryBroadcastTo throw when destination is too short, TryCopyTo returns false.
Reproduction Steps
Expected behavior
Return false; never throw.
Actual behavior
ArgumentException
Regression?
No response
Known Workarounds
No response
Configuration
.Net8, Ubuntu22, x64
Other information
No response
The text was updated successfully, but these errors were encountered: