-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Numerics.Tensorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Description
new TensorSpan<double>(new double[j], lengths: new IntPtr[] {2}, strides: new IntPtr[] {1}); throws a ArgumentException if j == 1 but not if j == 0 or j > 1.
Reproduction Steps
using System.Diagnostics.CodeAnalysis;
using System.Numerics.Tensors;
namespace ConsoleApp1;
public abstract class Program
{
[Experimental("SYSLIB5001")]
public static void Main()
{
new TensorSpan<double>(new double[0], lengths: new IntPtr[] {2}, strides: new IntPtr[] {1});
new TensorSpan<double>(new double[2], lengths: new IntPtr[] {2}, strides: new IntPtr[] {1});
new TensorSpan<double>(new double[1], lengths: new IntPtr[] {2}, strides: new IntPtr[] {1});
}
}Expected behavior
Error when j <= 1
Actual behavior
Error if and only if j == 1
Regression?
No response
Known Workarounds
No response
Configuration
.NET8, Ubuntu22, x64
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Numerics.Tensorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged