def unnp(dicary):
    """Return `dicary` with any ndarray values replaced by lists."""

    ndicary = {}
    for k, v in dicary.items():
        try:
            v.shape
        except AttributeError:
            ndicary[k] = v
        else:
            ndicary[k] = v.tolist()
    return ndicary