Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/astroid/brain/brain_numpy_random_mtrand.py: 86%

7 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-07 06:53 +0000

1# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html 

2# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE 

3# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt 

4 

5# TODO(hippo91) : correct the functions return types 

6"""Astroid hooks for numpy.random.mtrand module.""" 

7from astroid.brain.helpers import register_module_extender 

8from astroid.builder import parse 

9from astroid.manager import AstroidManager 

10 

11 

12def numpy_random_mtrand_transform(): 

13 return parse( 

14 """ 

15 def beta(a, b, size=None): return uninferable 

16 def binomial(n, p, size=None): return uninferable 

17 def bytes(length): return uninferable 

18 def chisquare(df, size=None): return uninferable 

19 def choice(a, size=None, replace=True, p=None): return uninferable 

20 def dirichlet(alpha, size=None): return uninferable 

21 def exponential(scale=1.0, size=None): return uninferable 

22 def f(dfnum, dfden, size=None): return uninferable 

23 def gamma(shape, scale=1.0, size=None): return uninferable 

24 def geometric(p, size=None): return uninferable 

25 def get_state(): return uninferable 

26 def gumbel(loc=0.0, scale=1.0, size=None): return uninferable 

27 def hypergeometric(ngood, nbad, nsample, size=None): return uninferable 

28 def laplace(loc=0.0, scale=1.0, size=None): return uninferable 

29 def logistic(loc=0.0, scale=1.0, size=None): return uninferable 

30 def lognormal(mean=0.0, sigma=1.0, size=None): return uninferable 

31 def logseries(p, size=None): return uninferable 

32 def multinomial(n, pvals, size=None): return uninferable 

33 def multivariate_normal(mean, cov, size=None): return uninferable 

34 def negative_binomial(n, p, size=None): return uninferable 

35 def noncentral_chisquare(df, nonc, size=None): return uninferable 

36 def noncentral_f(dfnum, dfden, nonc, size=None): return uninferable 

37 def normal(loc=0.0, scale=1.0, size=None): return uninferable 

38 def pareto(a, size=None): return uninferable 

39 def permutation(x): return uninferable 

40 def poisson(lam=1.0, size=None): return uninferable 

41 def power(a, size=None): return uninferable 

42 def rand(*args): return uninferable 

43 def randint(low, high=None, size=None, dtype='l'): 

44 import numpy 

45 return numpy.ndarray((1,1)) 

46 def randn(*args): return uninferable 

47 def random(size=None): return uninferable 

48 def random_integers(low, high=None, size=None): return uninferable 

49 def random_sample(size=None): return uninferable 

50 def rayleigh(scale=1.0, size=None): return uninferable 

51 def seed(seed=None): return uninferable 

52 def set_state(state): return uninferable 

53 def shuffle(x): return uninferable 

54 def standard_cauchy(size=None): return uninferable 

55 def standard_exponential(size=None): return uninferable 

56 def standard_gamma(shape, size=None): return uninferable 

57 def standard_normal(size=None): return uninferable 

58 def standard_t(df, size=None): return uninferable 

59 def triangular(left, mode, right, size=None): return uninferable 

60 def uniform(low=0.0, high=1.0, size=None): return uninferable 

61 def vonmises(mu, kappa, size=None): return uninferable 

62 def wald(mean, scale, size=None): return uninferable 

63 def weibull(a, size=None): return uninferable 

64 def zipf(a, size=None): return uninferable 

65 """ 

66 ) 

67 

68 

69register_module_extender( 

70 AstroidManager(), "numpy.random.mtrand", numpy_random_mtrand_transform 

71)