docs/support/ptypes.py
def wave_vectors(obj):
    r"""
    Validate if an object is a :ref:`WaveVectors` pseudo-type object.

    :param obj: Object
    :type  obj: any

    :raises: RuntimeError (Argument \`*[argument_name]*\` is not valid). The
     token \*[argument_name]\* is replaced by the name of the argument the
     contract is attached to

    :rtype: None
    """
    exdesc = pexdoc.pcontracts.get_exdesc()
    if not isinstance(obj, list) or (isinstance(obj, list) and not obj):
        raise ValueError(exdesc)
    if any([not (isinstance(item, tuple) and len(item) == 2) for item in obj]):
        raise ValueError(exdesc)
    indep_vector, dep_vector = zip(*obj)
    if _check_increasing_real_numpy_vector(np.array(indep_vector)):
        raise ValueError(exdesc)
    if _check_real_numpy_vector(np.array(dep_vector)):
        raise ValueError(exdesc)
def wave_vectors(obj):
    r"""
    Validate if an object is a :ref:`WaveVectors` pseudo-type object.

    :param obj: Object
    :type  obj: any

    :raises: RuntimeError (Argument \`*[argument_name]*\` is not valid). The
     token \*[argument_name]\* is replaced by the name of the argument the
     contract is attached to

    :rtype: None
    """
    exdesc = pexdoc.pcontracts.get_exdesc()
    if not isinstance(obj, list) or (isinstance(obj, list) and not obj):
        raise ValueError(exdesc)
    if any([not (isinstance(item, tuple) and len(item) == 2) for item in obj]):
        raise ValueError(exdesc)
    indep_vector, dep_vector = zip(*obj)
    if _check_increasing_real_numpy_vector(np.array(indep_vector)):
        raise ValueError(exdesc)
    if _check_real_numpy_vector(np.array(dep_vector)):
        raise ValueError(exdesc)
r"""
    Validate if an object is a :ref:`WaveVectors` pseudo-type object.

    :param obj: Object
    :type  obj: any

    :raises: RuntimeError (Argument \`*[argument_name]*\` is not valid). The
     token \*[argument_name]\* is replaced by the name of the argument the
     contract is attached to

    :rtype: None