Generate evenly spaced floats from start to end. Args: start (float): The starting value of the range. end (float): The ending value of the range. number_of_points (int): The number of points to generate. Returns: list: A list of number_of_points floats
(start: float, end: float, number_of_points: int)
| 98 | |
| 99 | |
| 100 | def linspace(start: float, end: float, number_of_points: int) -> list: |
| 101 | ''' |
| 102 | Generate evenly spaced floats from start to end. |
| 103 | |
| 104 | Args: |
| 105 | start (float): The starting value of the range. |
| 106 | end (float): The ending value of the range. |
| 107 | number_of_points (int): The number of points to generate. |
| 108 | |
| 109 | Returns: |
| 110 | list: A list of number_of_points floats, including the start and end values. |
| 111 | ''' |
| 112 | return [start + float(x)/(number_of_points-1)*(end-start) for x in range(number_of_points)] |
| 113 | |
| 114 | |
| 115 | def first_point(steps: list, fully_defined: bool = True) -> Point: |
no outgoing calls
no test coverage detected