"""generate fake data"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/data/fake.ipynb.

# %% auto 0
__all__ = ['sin']

# %% ../../nbs/data/fake.ipynb 3
import numpy as np

# %% ../../nbs/data/fake.ipynb 5
def sin(n = 100, seed=None):
    if seed: np.random.seed(1)
    y = np.sin(np.arange(n)) # target (ground truth)
    noise = np.random.rand(n) * 2 - 1 # between -1 and 1
    x = y + noise # input
    
    return x, y
