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
// Ensure that we were provided an empty multi-slice:
78
-
if(s.ndims!==sh.length){
79
-
thrownewRangeError(format('invalid operation. Number of array dimensions does not match the number of slice dimensions. Array shape: (%s). Slice dimensions: %u.',sh.join(','),s.ndims));
thrownewRangeError(format('invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.',shape.join(','),replace(prop,/\.\.\.,/,'').split(',').length));
80
113
}
81
114
}
115
+
// Case: empty string or ellipsis
116
+
elseif(prop.length===0||prop==='...'){
117
+
s=newMultiSlice();
118
+
}
82
119
// Case: non-empty string
83
-
elseif(prop.length!==0){
84
-
// TODO: the following can be generalized by going ahead and parsing the slice string or integer and passing to a functional API which then verifies that s.ndims !== sh.length. We need only retain the error raised for an invalid operation.
85
-
86
-
// Case: slice or an integer
87
-
if(ch==='S'||RE_INTEGER.test(prop)){
88
-
thrownewRangeError(format('invalid operation. Number of array dimensions does not match the number of slice dimensions. Array shape: (%s). Slice dimensions: %u.',sh.join(','),1));
0 commit comments