# Path: lantern/utils.py
# class LanternException(Exception):
#     pass


import os
import string
import numpy as np
import pandas as pd
from ..utils import LanternException
    for i in range(n_y):
        df[i + 1] = df[i].map(lambda x: x + np.random.randn() * np.random.randint(1, 10))
    return df


def sinwave(n=4, inc=.25):
    """
    Returns a DataFrame with the required format for
    a surface (sine wave) plot

    Parameters:
    -----------
        n : int
            Ranges for X and Y axis (-n, n)
        n_y : int
            Size of increment along the axis
    """
    x = np.arange(-n, n, inc)
    y = np.arange(-n, n, inc)
    X, Y = np.meshgrid(x, y)
    R = np.sqrt(X**2 + Y**2)
    Z = np.sin(R) / (.5 * R)
    return pd.DataFrame(Z, index=x, columns=y)


def getName(n=1, name=3, exchange=2, columns=None, mode='abc'):
    if columns:
        if isinstance(columns, str):
            columns = [columns]
        if n != len(columns):

# Path: lantern/utils.py
# class LanternException(Exception):
#     pass


# Path: lantern/data/cfgen.py
import os
import string
import numpy as np
import pandas as pd
from ..utils import LanternException

    for i in range(n_y):
        df[i + 1] = df[i].map(lambda x: x + np.random.randn() * np.random.randint(1, 10))
    return df


def sinwave(n=4, inc=.25):
    """
    Returns a DataFrame with the required format for
    a surface (sine wave) plot

    Parameters:
    -----------
        n : int
            Ranges for X and Y axis (-n, n)
        n_y : int
            Size of increment along the axis
    """
    x = np.arange(-n, n, inc)
    y = np.arange(-n, n, inc)
    X, Y = np.meshgrid(x, y)
    R = np.sqrt(X**2 + Y**2)
    Z = np.sin(R) / (.5 * R)
    return pd.DataFrame(Z, index=x, columns=y)


def getName(n=1, name=3, exchange=2, columns=None, mode='abc'):
    if columns:
        if isinstance(columns, str):
            columns = [columns]
        if n != len(columns):

            raise LanternException("Length of column names needs to be the \n same length of traces")