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