示例#1
0
def CustomMonitor(*args,**kwds):
    """generate a custom Monitor

Args:
    args (tuple(str)): tuple of the required Monitor inputs (e.g. ``x``).
    kwds (dict(str)): dict of ``{"input":"doc"}`` (e.g. ``x='Params'``).

Returns:
    a customized monitor instance

Examples:
    >>> sow = CustomMonitor('x','y',x="Params",y="Costs",e="Error",d="Deriv")
    >>> sow(1,1)
    >>> sow(2,4,e=0)
    >>> sow.x
    [1,2]
    >>> sow.y
    [1,4]
    >>> sow.e
    [0]
    >>> sow.d
    []
    """
    from mystic._genSow import genSow
    return genSow(**kwds)(*args)
示例#2
0
def CustomMonitor(*args, **kwds):
    """generate a custom Monitor

Args:
    args (tuple(str)): tuple of the required Monitor inputs (e.g. ``x``).
    kwds (dict(str)): dict of ``{"input":"doc"}`` (e.g. ``x='Params'``).

Returns:
    a customized monitor instance

Examples:
    >>> sow = CustomMonitor('x','y',x="Params",y="Costs",e="Error",d="Deriv")
    >>> sow(1,1)
    >>> sow(2,4,e=0)
    >>> sow.x
    [1,2]
    >>> sow.y
    [1,4]
    >>> sow.e
    [0]
    >>> sow.d
    []
    """
    from mystic._genSow import genSow
    return genSow(**kwds)(*args)
示例#3
0
def CustomMonitor(*args,**kwds):
    """
generate a custom Monitor

takes *args & **kwds, where args will be required inputs for the Monitor::
    - args: property name strings (i.e. 'x')
    - kwds: must be in the form: property="doc" (i.e. x='Params')

example usage...
    >>> sow = CustomMonitor('x','y',x="Params",y="Costs",e="Error",d="Deriv")
    >>> sow(1,1)
    >>> sow(2,4,e=0)
    >>> sow.x
    [1,2]
    >>> sow.y
    [1,4]
    >>> sow.e
    [0]
    >>> sow.d
    []
    """
    from mystic._genSow import genSow
    return genSow(**kwds)(*args)
示例#4
0
def CustomMonitor(*args, **kwds):
    """
generate a custom Monitor

takes *args & **kwds, where args will be required inputs for the Monitor::
    - args: property name strings (i.e. 'x')
    - kwds: must be in the form: property="doc" (i.e. x='Params')

example usage...
    >>> sow = CustomMonitor('x','y',x="Params",y="Costs",e="Error",d="Deriv")
    >>> sow(1,1)
    >>> sow(2,4,e=0)
    >>> sow.x
    [1,2]
    >>> sow.y
    [1,4]
    >>> sow.e
    [0]
    >>> sow.d
    []
    """
    from mystic._genSow import genSow
    return genSow(**kwds)(*args)