Skip to content

Commit edb1599

Browse files
committed
add vendored tests for numpy interface
also fixes bugs related to the tests, and updates some functionality
1 parent f048c07 commit edb1599

File tree

4 files changed

+1339
-141
lines changed

4 files changed

+1339
-141
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ extend-ignore =
77
# missing docstring in public class:
88
D101,
99
# missing docstring in public method:
10+
D102,
11+
# missing docstring in public function:
1012
D103,
1113
# missing docstring in public package:
1214
D104,

mkl_random/interfaces/_numpy_random.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,18 @@ def exponential(self, scale=1.0, size=None):
281281
"""
282282
return super().exponential(scale=scale, size=size)
283283

284+
def tomaxint(self, size=None):
285+
"""
286+
tomaxint(size=None)
287+
288+
Return a sample of uniformly distributed random integers in the
289+
interval [0, ``np.iinfo("long").max``].
290+
291+
For full documentation refer to `numpy.random.RandomState.tomaxint`.
292+
293+
"""
294+
return super().tomaxint(size=size)
295+
284296
def standard_exponential(self, size=None):
285297
"""
286298
standard_exponential(size=None)
@@ -314,27 +326,29 @@ def gamma(self, shape, scale=1.0, size=None):
314326
"""
315327
return super().gamma(shape=shape, scale=scale, size=size)
316328

317-
def f(self, dfn, dfd, size=None):
329+
def f(self, dfnum, dfden, size=None):
318330
"""
319-
f(dfn, dfd, size=None)
331+
f(dfnum, dfden, size=None)
320332
321333
Draw samples from an F distribution.
322334
323335
For full documentation refer to `numpy.random.f`.
324336
325337
"""
326-
return super().f(dfn=dfn, dfd=dfd, size=size)
338+
return super().f(dfnum=dfnum, dfden=dfden, size=size)
327339

328-
def noncentral_f(self, dfn, dfd, nonc, size=None):
340+
def noncentral_f(self, dfnum, dfden, nonc, size=None):
329341
"""
330-
noncentral_f(dfn, dfd, nonc, size=None)
342+
noncentral_f(dfnum, dfden, nonc, size=None)
331343
332344
Draw samples from a non-central F distribution.
333345
334346
For full documentation refer to `numpy.random.noncentral_f`.
335347
336348
"""
337-
return super().noncentral_f(dfn=dfn, dfd=dfd, nonc=nonc, size=size)
349+
return super().noncentral_f(
350+
dfnum=dfnum, dfden=dfden, nonc=nonc, size=size
351+
)
338352

339353
def chisquare(self, df, size=None):
340354
"""

0 commit comments

Comments
 (0)