# Path: skrf/constants.py
# INF = 1e99
# ALMOST_ZERO = 1e-12
# ZERO = 1e-4
# ONE = 1.0 + 1/1e14
# LOG_OF_NEG = -100
# K_BOLTZMANN = 1.38064852e-23
# T0 = 290.
# S_DEFINITIONS = ['power', 'pseudo', 'traveling']
# S_DEF_DEFAULT = 'power'
# def to_meters(d: NumberLike, unit: str = 'm', v_g: float = c) -> NumberLike:


import contextlib
import fnmatch
import os
import warnings
import numpy as npy
import collections
import pprint
import re
import sys
from typing import Iterable, Tuple, List, Union, Any
from datetime import datetime
from subprocess import Popen, PIPE
from functools import wraps
from .constants import Number, NumberLike

    See Also
    --------
    now_string

    """
    return datetime(*[int(k) for k in s.split('.')])


def find_nearest(array: npy.ndarray, value: Number) -> Number:
    """
    Find the nearest value in array.

    Parameters
    ----------
    array :  npy.ndarray
        array we are searching for a value in
    value : element of the array
        value to search for

    Returns
    --------
    found_value : an element of the array
        the value that is numerically closest to `value`

    """
    idx = find_nearest_index(array, value)
    return array[idx]



# Path: skrf/constants.py
# INF = 1e99
# ALMOST_ZERO = 1e-12
# ZERO = 1e-4
# ONE = 1.0 + 1/1e14
# LOG_OF_NEG = -100
# K_BOLTZMANN = 1.38064852e-23
# T0 = 290.
# S_DEFINITIONS = ['power', 'pseudo', 'traveling']
# S_DEF_DEFAULT = 'power'
# def to_meters(d: NumberLike, unit: str = 'm', v_g: float = c) -> NumberLike:


# Path: skrf/util.py
import contextlib
import fnmatch
import os
import warnings
import numpy as npy
import collections
import pprint
import re
import sys
from typing import Iterable, Tuple, List, Union, Any
from datetime import datetime
from subprocess import Popen, PIPE
from functools import wraps
from .constants import Number, NumberLike


    See Also
    --------
    now_string

    """
    return datetime(*[int(k) for k in s.split('.')])


def find_nearest(array: npy.ndarray, value: Number) -> Number:
    """
    Find the nearest value in array.

    Parameters
    ----------
    array :  npy.ndarray
        array we are searching for a value in
    value : element of the array
        value to search for

    Returns
    --------
    found_value : an element of the array
        the value that is numerically closest to `value`

    """
    idx = find_nearest_index(array, value)
    return array[idx]



def find_nearest_index(array: npy.ndarray, value: Number) -> int: