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
@@ -105,7 +111,7 @@ function broadcastArray( x, shape ) {
105
111
thrownewTypeError(format('invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.',shape));
106
112
}
107
113
N=shape.length;
108
-
sh=x.shape;
114
+
sh=getShape(x);
109
115
M=sh.length;
110
116
if(N<M){
111
117
thrownewError('invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.');
@@ -116,7 +122,7 @@ function broadcastArray( x, shape ) {
116
122
strides.push(0);
117
123
}
118
124
// Determine the output array strides...
119
-
st=x.strides;
125
+
st=getStrides(x);
120
126
for(i=N-1;i>=0;i--){
121
127
j=M-N+i;
122
128
if(j<0){
@@ -141,7 +147,7 @@ function broadcastArray( x, shape ) {
141
147
thrownewError(format('invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.',copy(sh).join(', '),copy(shape).join(', '),i));
0 commit comments