45
45
Given a shape of, for example, (m,n,k), m*n*k samples are
46
46
generated, and packed in an m-by-n-by-k arrangement. Because
47
47
each sample is N-dimensional, the output shape is (m,n,k,N).
48
+ dtype : data type object, optional (default : float)
49
+ The type and size of the data to be returned.
48
50
49
51
Returns
50
52
-------
@@ -180,7 +182,7 @@ def test_extended_summary():
180
182
181
183
182
184
def test_parameters ():
183
- assert len (doc ['Parameters' ]) == 3
185
+ assert len (doc ['Parameters' ]) == 4
184
186
names = [n for n , _ , _ in doc ['Parameters' ]]
185
187
assert all (a == b for a , b in zip (names , ['mean' , 'cov' , 'shape' ]))
186
188
@@ -189,6 +191,17 @@ def test_parameters():
189
191
assert desc [0 ].startswith ('Covariance matrix' )
190
192
assert doc ['Parameters' ][0 ][- 1 ][- 1 ] == ' (1+2+3)/3'
191
193
194
+ arg , arg_type , desc = doc ['Parameters' ][2 ]
195
+ assert arg == 'shape'
196
+ assert arg_type == 'tuple of ints'
197
+ assert desc [0 ].startswith ('Given' )
198
+ assert doc ['Parameters' ][0 ][- 1 ][- 1 ] == ' (1+2+3)/3'
199
+
200
+ arg , arg_type , desc = doc ['Parameters' ][3 ]
201
+ assert arg == 'dtype'
202
+ assert arg_type == 'data type object, optional (default : float)'
203
+ assert desc [0 ].startswith ('The type and size' )
204
+
192
205
193
206
def test_other_parameters ():
194
207
assert len (doc ['Other Parameters' ]) == 1
@@ -205,7 +218,7 @@ def test_returns():
205
218
assert arg_type == 'ndarray'
206
219
assert desc [0 ].startswith ('The drawn samples' )
207
220
assert desc [- 1 ].endswith ('distribution.' )
208
-
221
+
209
222
arg , arg_type , desc = doc ['Returns' ][1 ]
210
223
assert arg == ''
211
224
assert arg_type == 'list of str'
@@ -394,6 +407,8 @@ def test_str():
394
407
Given a shape of, for example, (m,n,k), m*n*k samples are
395
408
generated, and packed in an m-by-n-by-k arrangement. Because
396
409
each sample is N-dimensional, the output shape is (m,n,k,N).
410
+ dtype : data type object, optional (default : float)
411
+ The type and size of the data to be returned.
397
412
398
413
Returns
399
414
-------
@@ -560,6 +575,9 @@ def test_sphinx_str():
560
575
generated, and packed in an m-by-n-by-k arrangement. Because
561
576
each sample is N-dimensional, the output shape is (m,n,k,N).
562
577
578
+ **dtype** : data type object, optional (default : float)
579
+ The type and size of the data to be returned.
580
+
563
581
:Returns:
564
582
565
583
**out** : ndarray
0 commit comments