Compare commits
5 Commits
fadd93b9a6
...
7e4bfc9ba0
Author | SHA1 | Date | |
---|---|---|---|
7e4bfc9ba0 | |||
cdfd3e47b5 | |||
364f16b872 | |||
cc94f1f50c | |||
ad6923f8cd |
9
.drone.yml
Normal file
9
.drone.yml
Normal file
@ -0,0 +1,9 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: testing
|
||||
image: python
|
||||
commands:
|
||||
- pip install -r requirements.txt
|
||||
- pytest --doctest-modules ./mapytex/
|
@ -1,4 +1,5 @@
|
||||
# Mapytex
|
||||
[![Build Status](https://drone.opytex.org/api/badges/lafrite/Mapytex/status.svg)](https://drone.opytex.org/lafrite/Mapytex)
|
||||
|
||||
Formal calculus with explanation python module and exercises creation tools.
|
||||
|
||||
|
@ -23,12 +23,18 @@ def random_generator(
|
||||
:param v_max: maximum accepted value
|
||||
:param exact_mean: if set, the last generated number will be create in order that the computed mean is exacly equal to "exact_mean"
|
||||
|
||||
>>> random_generator(10)
|
||||
>>> random_generator(10, distrib = uniform, rd_args = (5, 10))
|
||||
>>> random_generator(10, distrib = "uniform", rd_args = (5, 10))
|
||||
>>> random_generator(10, v_min = 0)
|
||||
>>> random_generator(10, exact_mean = 0)
|
||||
>>> random_generator(10, distrib = gauss, rd_args = (50,20), nbr_format = int)
|
||||
>>> random_generator(10) # doctest: +SKIP
|
||||
[-0.76, 0.46, 0.19, 0.08, -1.13, -0.5, 0.47, -2.11, 0.16, -1.05]
|
||||
>>> random_generator(10, distrib = uniform, rd_args = (5, 10)) # doctest: +SKIP
|
||||
[9.01, 5.32, 5.59, 8.8, 7.36, 6.9, 6.05, 7.44, 9.47, 6.95]
|
||||
>>> random_generator(10, distrib = "uniform", rd_args = (5, 10)) # doctest: +SKIP
|
||||
[7.85, 9.01, 5.32, 5.59, 8.8, 7.36, 6.9, 6.05, 7.44, 9.47]
|
||||
>>> random_generator(10, v_min = 0) # doctest: +SKIP
|
||||
[0.46, 0.19, 0.08, 0.47, 0.16, 0.87, 0.17, 1.79, 0.19, 1.12]
|
||||
>>> random_generator(10, exact_mean = 0) # doctest: +SKIP
|
||||
[-0.76, 0.46, 0.19, 0.08, -1.13, -0.5, 0.47, -2.11, 0.16, 3.14]
|
||||
>>> random_generator(10, distrib = gauss, rd_args = (50,20), nbr_format = int) # doctest: +SKIP
|
||||
[34, 59, 53, 51, 27, 40, 59, 7, 53, 28]
|
||||
|
||||
"""
|
||||
# if exact_mean is set, we create automaticaly only length-1 value
|
||||
|
Loading…
Reference in New Issue
Block a user