@@ -358,95 +358,6 @@ tape( 'the function supports specifying the output array data type (dtype=float6
358
358
t . end ( ) ;
359
359
} ) ;
360
360
361
- tape ( 'the function supports specifying the output array data type (dtype=float32; scalar)' , function test ( t ) {
362
- var actual ;
363
- var shape ;
364
- var i ;
365
-
366
- shape = [ 3 , 3 ] ;
367
- actual = random ( shape , PARAM1 , {
368
- 'dtype' : 'float32'
369
- } ) ;
370
-
371
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
372
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
373
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
374
-
375
- for ( i = 0 ; i < numel ( actual ) ; i ++ ) {
376
- t . strictEqual ( typeof actual . iget ( i ) , 'number' , 'returns expected value for index ' + i ) ;
377
- }
378
- t . end ( ) ;
379
- } ) ;
380
-
381
- tape ( 'the function supports specifying the output array data type (dtype=float32; zero-dimensional ndarray)' , function test ( t ) {
382
- var actual ;
383
- var param1 ;
384
- var shape ;
385
- var i ;
386
-
387
- shape = [ 3 , 3 ] ;
388
- param1 = scalar2ndarray ( PARAM1 , 'float32' , 'row-major' ) ;
389
-
390
- actual = random ( shape , param1 , {
391
- 'dtype' : 'float32'
392
- } ) ;
393
-
394
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
395
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
396
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
397
-
398
- for ( i = 0 ; i < numel ( actual ) ; i ++ ) {
399
- t . strictEqual ( typeof actual . iget ( i ) , 'number' , 'returns expected value for index ' + i ) ;
400
- }
401
- t . end ( ) ;
402
- } ) ;
403
-
404
- tape ( 'the function supports specifying the output array data type (dtype=float32; ndarray)' , function test ( t ) {
405
- var actual ;
406
- var param1 ;
407
- var shape ;
408
- var i ;
409
-
410
- shape = [ 2 , 2 ] ;
411
- param1 = array ( [ [ PARAM1 , PARAM1 ] , [ PARAM1 , PARAM1 ] ] ) ;
412
-
413
- actual = random ( shape , param1 , {
414
- 'dtype' : 'float32'
415
- } ) ;
416
-
417
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
418
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
419
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
420
-
421
- for ( i = 0 ; i < numel ( actual ) ; i ++ ) {
422
- t . strictEqual ( typeof actual . iget ( i ) , 'number' , 'returns expected value for index ' + i ) ;
423
- }
424
- t . end ( ) ;
425
- } ) ;
426
-
427
- tape ( 'the function supports specifying the output array data type (dtype=float32; broadcasted ndarray)' , function test ( t ) {
428
- var actual ;
429
- var param1 ;
430
- var shape ;
431
- var i ;
432
-
433
- shape = [ 2 , 2 ] ;
434
- param1 = array ( [ [ PARAM1 , PARAM1 ] ] ) ;
435
-
436
- actual = random ( shape , param1 , {
437
- 'dtype' : 'float32'
438
- } ) ;
439
-
440
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
441
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
442
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
443
-
444
- for ( i = 0 ; i < numel ( actual ) ; i ++ ) {
445
- t . strictEqual ( typeof actual . iget ( i ) , 'number' , 'returns expected value for index ' + i ) ;
446
- }
447
- t . end ( ) ;
448
- } ) ;
449
-
450
361
tape ( 'the function supports specifying the output array data type (dtype=generic; scalar)' , function test ( t ) {
451
362
var actual ;
452
363
var shape ;
@@ -779,42 +690,6 @@ tape( 'if provided an empty shape, the function returns a zero-dimensional ndarr
779
690
t . end ( ) ;
780
691
} ) ;
781
692
782
- tape ( 'if provided an empty shape, the function returns a zero-dimensional ndarray (dtype=float32; scalar)' , function test ( t ) {
783
- var actual ;
784
- var shape ;
785
-
786
- shape = [ ] ;
787
- actual = random ( shape , PARAM1 , {
788
- 'dtype' : 'float32'
789
- } ) ;
790
-
791
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
792
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
793
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
794
-
795
- t . strictEqual ( typeof actual . get ( ) , 'number' , 'returns expected value' ) ;
796
- t . end ( ) ;
797
- } ) ;
798
-
799
- tape ( 'if provided an empty shape, the function returns a zero-dimensional ndarray (dtype=float32; zero-dimensional ndarray)' , function test ( t ) {
800
- var actual ;
801
- var param1 ;
802
- var shape ;
803
-
804
- shape = [ ] ;
805
- param1 = scalar2ndarray ( PARAM1 , 'float32' , 'row-major' ) ;
806
- actual = random ( shape , param1 , {
807
- 'dtype' : 'float32'
808
- } ) ;
809
-
810
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
811
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
812
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
813
-
814
- t . strictEqual ( typeof actual . get ( ) , 'number' , 'returns expected value' ) ;
815
- t . end ( ) ;
816
- } ) ;
817
-
818
693
tape ( 'if provided an empty shape, the function returns a zero-dimensional ndarray (dtype=generic; scalar)' , function test ( t ) {
819
694
var actual ;
820
695
var shape ;
@@ -883,23 +758,6 @@ tape( 'if provided a shape having one or more dimensions of size zero, the funct
883
758
t . end ( ) ;
884
759
} ) ;
885
760
886
- tape ( 'if provided a shape having one or more dimensions of size zero, the function returns an empty array (dtype=float32)' , function test ( t ) {
887
- var actual ;
888
- var shape ;
889
-
890
- shape = [ 2 , 0 , 2 ] ;
891
- actual = random ( shape , PARAM1 , {
892
- 'dtype' : 'float32'
893
- } ) ;
894
-
895
- t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
896
- t . strictEqual ( getDType ( actual ) , 'float32' , 'returns expected value' ) ;
897
- t . deepEqual ( getShape ( actual ) , shape , 'returns expected value' ) ;
898
-
899
- t . strictEqual ( numel ( actual ) , 0 , 'returns expected value' ) ;
900
- t . end ( ) ;
901
- } ) ;
902
-
903
761
tape ( 'if provided a shape having one or more dimensions of size zero, the function returns an empty array (dtype=generic)' , function test ( t ) {
904
762
var actual ;
905
763
var shape ;
0 commit comments