@@ -32,11 +32,11 @@ def is_number(value: Union[int, float, str]):
3232 Examples
3333 --------
3434 >>> from pymove.utils.math import is_number
35- >>> a,b,c, d = 50,22.5,'11.25','house'
35+ >>> a, b, c, d = 50, 22.5, '11.25', 'house'
3636 >>> print(is_number(a), type(is_number(a)))
3737 True <class 'bool'>
3838 >>> print(is_number(b), type(is_number(b)))
39- True <class 'bool'>-
39+ True <class 'bool'>
4040 >>> print(is_number(c), type(is_number(c)))
4141 True <class 'bool'>
4242 >>> print(is_number(d), type(is_number(d)))
@@ -71,7 +71,7 @@ def std(values_array: List[float]) -> float:
7171 Example
7272 -------
7373 >>> from pymove.utils.math import std
74- >>> list = [7.8,9.7,6.4,5.6, 10]
74+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
7575 >>> print(std(list), type(std(list)))
7676 1.7435595774162693 <class 'float'>
7777 """
@@ -101,7 +101,7 @@ def avg_std(values_array: List[float]) -> Tuple[float, float]:
101101 Example
102102 -------
103103 >>> from pymove.utils.math import avg_std
104- >>> list = [7.8,9.7,6.4,5.6, 10]
104+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
105105 >>> print(avg_std(list), type(avg_std(list)))
106106 1.9493588689617927 <class 'float'>
107107 """
@@ -126,7 +126,7 @@ def std_sample(values_array: List[float]) -> float:
126126 Example
127127 -------
128128 >>> from pymove.utils.math import std_sample
129- >>> list = [7.8,9.7,6.4,5.6, 10]
129+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
130130 >>> print(std_sample(list), type(std_sample(list)))
131131 1.9493588689617927 <class 'float'>
132132 """
@@ -153,7 +153,7 @@ def avg_std_sample(values_array: List[float]) -> Tuple[float, float]:
153153 Example
154154 -------
155155 >>> from pymove.utils.math import avg_std_sample
156- >>> list = [7.8,9.7,6.4,5.6, 10]
156+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
157157 >>> print(avg_std_sample(list), type(avg_std_sample(list)))
158158 (7.9, 1.9493588689617927) <class 'tuple'>
159159 """
@@ -183,13 +183,16 @@ def arrays_avg(
183183 Examples
184184 --------
185185 >>> from pymove.utils.math import arrays_avg
186- >>> list = [7.8,9.7,6.4,5.6, 10]
187- >>> weights = [0.1,0.3,0.15,0.15,0.3]
186+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
187+ >>> weights = [0.1, 0.3, 0.15, 0.15, 0.3]
188188 >>> print('standard average', arrays_avg(list), type(arrays_avg(list)))
189- standard average 7.9 <class 'float'>
190- >>> print('weighted average: ', arrays_avg(list, weights),
191- type(arrays_avg(list, weights)))
192- weighted average: 1.6979999999999997 <class 'float'>
189+ 'standard average 7.9 <class 'float'>'
190+ >>> print(
191+ >>> 'weighted average: ',
192+ >>> arrays_avg(list, weights),
193+ >>> type(arrays_avg(list, weights))
194+ >>> )
195+ 'weighted average: 1.6979999999999997 <class 'float'>'
193196 """
194197 n = len (values_array )
195198
@@ -231,7 +234,7 @@ def array_stats(values_array: List[float]) -> Tuple[float, float, int]:
231234 Example
232235 -------
233236 >>> from pymove.utils.math import array_stats
234- >>> list = [7.8,9.7,6.4,5.6, 10]
237+ >>> list = [7.8, 9.7, 6.4, 5.6, 10]
235238 >>> print(array_stats(list), type(array_stats(list)))
236239 (39.5, 327.25, 5) <class 'tuple'>
237240 """
@@ -270,7 +273,7 @@ def interpolation(x0: float, y0: float, x1: float, y1: float, x: float) -> float
270273 Example
271274 -------
272275 >>> from pymove.utils.math import interpolation
273- >>> x0,y0,x1,y1,x = 2,4,3,6, 3.5
276+ >>> x0, y0, x1, y1, x = 2, 4, 3, 6, 3.5
274277 >>> print(interpolation(x0,y0,x1,y1,x), type(interpolation(x0,y0,x1,y1,x)))
275278 7.0 <class 'float'>
276279 """
0 commit comments