# AUTOGENERATED! DO NOT EDIT! File to edit: 01_reshape.ipynb (unless otherwise specified).

__all__ = ['complex_random_sample']

# Cell
from numpy.random import random_sample
from numpy import array
from numpy.testing import assert_allclose

# Cell
def complex_random_sample(shape_tuple):
    ''' A complex analogue of the random_sample numpy function.
    Inputs
    shape_tuple : tuple
                Tuple containing the dimensions of the final
                complex array.

    Outputs :
    crs       : ndarray
                the complex random array of the shape as specified
                in the shape_tuple
                complex random sample

    '''
    rrs = random_sample(shape_tuple)  # real part of complex random sample
    irs = random_sample(shape_tuple)  # imaginary part
    crs = rrs + 1j*irs  # complex random sample
    return crs
