import torch
import math


def generate_dataset(nb):
    """
    Generates dataset!
    
    Inputs:
        - nb :      Number of samples to create.
    
    Outputs:
        - input_  : train/test samples with 2 features (nb, 2)
        - target_ : labels (nb,)
    """
    input_ = torch.empty(nb,2).uniform_(0,1)
    target_ = torch.where((input_.pow(2).sum(dim=1))<=math.sqrt(1/(2*math.pi)), torch.ones(nb), torch.zeros(nb)).long()
    return input_, target_