diff options
Diffstat (limited to 'numpy/core/function_base.py')
-rw-r--r-- | numpy/core/function_base.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 3e919c761..b2f9dc70c 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -3,7 +3,7 @@ __all__ = ['logspace', 'linspace'] import numeric as _nx from numeric import array -def linspace(start, stop, num=50, endpoint=True, retstep=False, maskna=False): +def linspace(start, stop, num=50, endpoint=True, retstep=False): """ Return evenly spaced numbers over a specified interval. @@ -29,8 +29,6 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, maskna=False): retstep : bool, optional If True, return (`samples`, `step`), where `step` is the spacing between samples. - maskna : boolean - If this is true, the returned array will have an NA mask. Returns ------- @@ -75,22 +73,22 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, maskna=False): """ num = int(num) if num <= 0: - return array([], float, maskna=maskna) + return array([], float) if endpoint: if num == 1: - return array([float(start)], maskna=maskna) + return array([float(start)]) step = (stop-start)/float((num-1)) - y = _nx.arange(0, num, maskna=maskna) * step + start + y = _nx.arange(0, num) * step + start y[-1] = stop else: step = (stop-start)/float(num) - y = _nx.arange(0, num, maskna=maskna) * step + start + y = _nx.arange(0, num) * step + start if retstep: return y, step else: return y -def logspace(start,stop,num=50,endpoint=True,base=10.0, maskna=False): +def logspace(start,stop,num=50,endpoint=True,base=10.0): """ Return numbers spaced evenly on a log scale. @@ -116,8 +114,6 @@ def logspace(start,stop,num=50,endpoint=True,base=10.0, maskna=False): The base of the log space. The step size between the elements in ``ln(samples) / ln(base)`` (or ``log_base(samples)``) is uniform. Default is 10.0. - maskna : boolean - If this is true, the returned array will have an NA mask. Returns ------- @@ -166,6 +162,6 @@ def logspace(start,stop,num=50,endpoint=True,base=10.0, maskna=False): >>> plt.show() """ - y = linspace(start,stop,num=num,endpoint=endpoint,maskna=maskna) + y = linspace(start,stop,num=num,endpoint=endpoint) return _nx.power(base,y) |