def exponential(scale=1.0, size=None): '''Return dataset of given shape (or a single number) with samples taken from an exponential distribution of parameter scale ''' if size is None: return _random.exponential(scale, [1]).getObject([0]) return _random.exponential(scale, _asiter(size))