Skip to content

Commit f7ba7f2

Browse files
committed
Added guard for unsupported slice.IsEllipsis
1 parent 74ae84f commit f7ba7f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NumSharp.Core/Backends/Unmanaged/UnmanagedStorage.Slicing.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public UnmanagedStorage GetView(params Slice[] slices)
1919
if (slices == null)
2020
throw new ArgumentNullException(nameof(slices));
2121

22+
foreach (var slice in slices)
23+
if (slice.IsEllipsis)
24+
throw new NotSupportedException("Ellipsis slicing '...' is not supported by NumSharp.");
25+
2226
//handle memory slice if possible
2327
if (!_shape.IsSliced)
2428
{

0 commit comments

Comments
 (0)