Spaces:
Running
Running
File size: 527 Bytes
e7cae83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from typing import List, Any
import numpy
def create_metavar(ranges : List[Any]) -> str:
return '[' + str(ranges[0]) + '-' + str(ranges[-1]) + ']'
def create_int_range(start : int, stop : int, step : int) -> List[int]:
return (numpy.arange(start, stop + step, step)).tolist()
def create_float_range(start : float, stop : float, step : float) -> List[float]:
return (numpy.around(numpy.arange(start, stop + step, step), decimals = 2)).tolist()
def get_first(__list__ : Any) -> Any:
return next(iter(__list__), None)
|