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
@@ -278,6 +279,7 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
278
279
varopts;
279
280
varordx;
280
281
varordy;
282
+
varordz;
281
283
varerr;
282
284
varidx;
283
285
varshx;
@@ -294,6 +296,10 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
294
296
varz;
295
297
vari;
296
298
varj;
299
+
varo;
300
+
301
+
// Default ndarray settings:
302
+
o=defaultSettings();
297
303
298
304
nargs=arguments.length;
299
305
if(!isndarrayLike(x)){
@@ -310,13 +316,12 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
310
316
if(!contains(this._idtypes[1],ydt)){
311
317
thrownewTypeError(format('invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.',join(this._idtypes[1],'", "'),ydt));
312
318
}
313
-
if(xdt!==ydt){
314
-
thrownewTypeError(format('invalid argument. Both ndarray arguments must be off same data types. But got first ndarray data type "%s", second ndarray data type: `%s`.',xdt,ydt));
315
-
}
316
319
ordx=getOrder(x);
317
320
ordy=getOrder(y);
318
-
if(ordx!==ordy){
319
-
thrownewTypeError(format('invalid argument. Both ndarray arguments must be off same order. But got first ndarray order "%s", second ndarray order: `%s`.',ordx,ordy));
321
+
if(ordx===ordy){
322
+
ordz=ordx;
323
+
}else{
324
+
ordz=o.order;
320
325
}
321
326
args=[x,y];
322
327
for(i=2;i<nargs;i++){
@@ -371,7 +376,7 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
// Determine whether we need to cast the input ndarray...
@@ -471,8 +476,6 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
471
476
vardtypes;
472
477
varnargs;
473
478
varopts;
474
-
varordx;
475
-
varordy;
476
479
varargs;
477
480
vararr;
478
481
varerr;
@@ -505,14 +508,6 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
505
508
if(!contains(this._idtypes[1],ydt)){
506
509
thrownewTypeError(format('invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.',join(this._idtypes[1],'", "'),ydt));
507
510
}
508
-
if(xdt!==ydt){
509
-
thrownewTypeError(format('invalid argument. Both ndarray arguments must be off same data types. But got first ndarray data type "%s", second ndarray data type: `%s`.',xdt,ydt));
510
-
}
511
-
ordx=getOrder(x);
512
-
ordy=getOrder(y);
513
-
if(ordx!==ordy){
514
-
thrownewTypeError(format('invalid argument. Both ndarray arguments must be off same order. But got first ndarray order "%s", second ndarray order: `%s`.',ordx,ordy));
515
-
}
516
511
shx=getShape(x);
517
512
shy=getShape(y);
518
513
@@ -577,14 +572,14 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
0 commit comments