-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Closed
Copy link
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>(Array.Empty<double>()).Slice(new NRange[] { .. });throws an IndexOutOfRangeException but should return an empty span.
Reproduction Steps
using System.Buffers;
using System.Diagnostics.CodeAnalysis;
using System.Numerics.Tensors;
namespace ConsoleApp1;
public abstract class Program
{
[Experimental("SYSLIB5001")]
public static void Main()
{
new TensorSpan<double>(Array.Empty<double>()).Slice(new NRange[] { .. });
}
}Expected behavior
Empty span
Actual behavior
Exception
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