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
* @param {string} [options.mode] - specifies how to handle indices which exceed ndarray dimensions
361
371
* @param {StringArray} [options.submode] - specifies how to handle subscripts which exceed ndarray dimensions on a per dimension basis
@@ -416,7 +426,7 @@ setReadOnly( Random.prototype, 'generate', function generate( shape, param1, par
416
426
params=initialScan([param1,param2]);
417
427
for(i=0;i<params.length;i++){
418
428
dt=params[i].dtype;
419
-
if(!contains(this._idtypes[i],dt)){
429
+
if(!contains(this._idtypes[i],resolveStr(dt))){
420
430
thrownewTypeError(format('invalid argument. %s argument must have one of the following data types: "%s". Data type: `%s`.',ORDINALS[i+1],join(this._idtypes[i],'", "'),dt));
421
431
}
422
432
}
@@ -461,7 +471,7 @@ setReadOnly( Random.prototype, 'generate', function generate( shape, param1, par
461
471
}
462
472
// If provided scalar PRNG parameters, we can simply fill a linear buffer with pseudorandom values (as all pseudorandom values are drawn from the same PRNG) and then wrap as an ndarray...
463
473
if(FLG){
464
-
if(dt==='generic'){
474
+
if(isEqualDataType(dt,'generic')){
465
475
buf=filledBy(len,wrapper);
466
476
}else{
467
477
buf=buffer(dt,len);
@@ -552,7 +562,7 @@ setReadOnly( Random.prototype, 'assign', function assign( param1, param2, out )
552
562
sh=getShape(out);
553
563
ord=getOrder(out);
554
564
odt=getDType(out);
555
-
if(!contains(this._odtypes,odt)){
565
+
if(!contains(this._odtypes,resolveStr(odt))){
556
566
thrownewTypeError(format('invalid argument. %s argument must have one of the following data types: "%s". Data type: `%s`.',ORDINALS[2],join(this._odtypes,'", "'),odt));
557
567
}
558
568
params=[param1,param2];
@@ -581,7 +591,7 @@ setReadOnly( Random.prototype, 'assign', function assign( param1, param2, out )
581
591
pdt='generic';
582
592
p=broadcastScalar(p,pdt,sh,ord);
583
593
}
584
-
if(!contains(this._idtypes[i],pdt)){
594
+
if(!contains(this._idtypes[i],resolveStr(pdt))){
585
595
thrownewTypeError(format('invalid argument. %s argument must have one of the following data types: "%s". Data type: `%s`.',ORDINALS[i],join(this._idtypes[i],'", "'),pdt));
0 commit comments