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
thrownewRangeError(format('invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.',sh.length,ndims));
107
+
o=strides2order(st);
108
+
if(o===0||o===3){
109
+
// Fallback to stated layout when unable to infer the underlying physical layout:
110
+
isrm=isRowMajorString(ord);
111
+
}else{
112
+
isrm=(o===1);
113
+
}
114
+
N=sh.length;
115
+
116
+
if(N>ndims){
117
+
thrownewRangeError(format('invalid argument. First argument must be greater than or equal to the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `%d`.',N,ndims));
thrownewError(format('invalid argument. Must provide unique dimension indices. Value: `[%s]`.',join(dims,', ')));
115
126
}
116
-
if(d.length!==sh.length){
117
-
thrownewRangeError(format('invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.',sh.length,join(dims,', ')));
127
+
if(d.length!==N){
128
+
thrownewRangeError(format('invalid argument. Must provide the same number of dimension indices as the number of dimensions in the input ndarray. Number of dimensions: %d. Value: `[%s]`.',N,join(dims,', ')));
118
129
}
119
130
if(d.length&&!isSortedAscending(d)){
120
131
thrownewError(format('invalid argument. Must provide dimension indices which resolve to nonnegative indices arranged in ascending order. Value: `[%s]`.',join(dims,', ')));
121
132
}
122
133
// When provided a zero-dimensional array, every expanded dimension is a singleton dimension having zero stride...
0 commit comments