186
186
long = int
187
187
188
188
189
- @cbook .deprecated ("2.2" , alternative = 'np .logspace, np .geomspace' )
189
+ @cbook .deprecated ("2.2" , alternative = 'numpy .logspace or numpy .geomspace' )
190
190
def logspace (xmin , xmax , N ):
191
191
'''
192
192
Return N values logarithmically spaced between xmin and xmax.
@@ -1346,7 +1346,7 @@ def donothing_callback(*args):
1346
1346
pass
1347
1347
1348
1348
1349
- @cbook .deprecated ('2.2' )
1349
+ @cbook .deprecated ('2.2' , 'scipy.signal.coherence' )
1350
1350
def cohere_pairs (X , ij , NFFT = 256 , Fs = 2 , detrend = detrend_none ,
1351
1351
window = window_hanning , noverlap = 0 ,
1352
1352
preferSpeedOverMemory = True ,
@@ -1504,7 +1504,7 @@ def cohere_pairs(X, ij, NFFT=256, Fs=2, detrend=detrend_none,
1504
1504
return Cxy , Phase , freqs
1505
1505
1506
1506
1507
- @cbook .deprecated ('2.2' )
1507
+ @cbook .deprecated ('2.2' , 'scipy.stats.entropy' )
1508
1508
def entropy (y , bins ):
1509
1509
r"""
1510
1510
Return the entropy of the data in *y* in units of nat.
@@ -1534,7 +1534,7 @@ def entropy(y, bins):
1534
1534
return S
1535
1535
1536
1536
1537
- @cbook .deprecated ('2.2' )
1537
+ @cbook .deprecated ('2.2' , 'scipy.stats.norm.pdf' )
1538
1538
def normpdf (x , * args ):
1539
1539
"Return the normal pdf evaluated at *x*; args provides *mu*, *sigma*"
1540
1540
mu , sigma = args
@@ -1718,7 +1718,7 @@ def _get_colinear():
1718
1718
return a
1719
1719
1720
1720
1721
- @cbook .deprecated ('2.2' )
1721
+ @cbook .deprecated ('2.2' , 'numpy.percentile' )
1722
1722
def prctile (x , p = (0.0 , 25.0 , 50.0 , 75.0 , 100.0 )):
1723
1723
"""
1724
1724
Return the percentiles of *x*. *p* can either be a sequence of
@@ -1801,7 +1801,7 @@ def center_matrix(M, dim=0):
1801
1801
return M
1802
1802
1803
1803
1804
- @cbook .deprecated ('2.2' )
1804
+ @cbook .deprecated ('2.2' , 'scipy.integrate.ode' )
1805
1805
def rk4 (derivs , y0 , t ):
1806
1806
"""
1807
1807
Integrate 1D or ND system of ODEs using 4-th order Runge-Kutta.
@@ -1919,7 +1919,7 @@ def get_sparse_matrix(M, N, frac=0.1):
1919
1919
return data
1920
1920
1921
1921
1922
- @cbook .deprecated ('2.2' )
1922
+ @cbook .deprecated ('2.2' , 'numpy.hypot' )
1923
1923
def dist (x , y ):
1924
1924
"""
1925
1925
Return the distance between two points.
@@ -2061,7 +2061,7 @@ def movavg(x, n):
2061
2061
exp_safe_MAX = 1.7976931348623157e+308
2062
2062
2063
2063
2064
- @cbook .deprecated ("2.2" )
2064
+ @cbook .deprecated ("2.2" , 'numpy.exp' )
2065
2065
def exp_safe (x ):
2066
2066
"""
2067
2067
Compute exponentials which safely underflow to zero.
@@ -2077,7 +2077,7 @@ def exp_safe(x):
2077
2077
return math .exp (x )
2078
2078
2079
2079
2080
- @cbook .deprecated ("2.2" , alternative = 'np .array(list(map(...)))' )
2080
+ @cbook .deprecated ("2.2" , alternative = 'numpy .array(list(map(...)))' )
2081
2081
def amap (fn , * args ):
2082
2082
"""
2083
2083
amap(function, sequence[, sequence, ...]) -> array.
@@ -2096,7 +2096,7 @@ def rms_flat(a):
2096
2096
return np .sqrt (np .mean (np .abs (a ) ** 2 ))
2097
2097
2098
2098
2099
- @cbook .deprecated ("2.2" , alternative = 'np .linalg.norm(a, ord=1)' )
2099
+ @cbook .deprecated ("2.2" , alternative = 'numpy .linalg.norm(a, ord=1)' )
2100
2100
def l1norm (a ):
2101
2101
"""
2102
2102
Return the *l1* norm of *a*, flattened out.
@@ -2106,7 +2106,7 @@ def l1norm(a):
2106
2106
return np .sum (np .abs (a ))
2107
2107
2108
2108
2109
- @cbook .deprecated ("2.2" , alternative = 'np .linalg.norm(a, ord=2)' )
2109
+ @cbook .deprecated ("2.2" , alternative = 'numpy .linalg.norm(a, ord=2)' )
2110
2110
def l2norm (a ):
2111
2111
"""
2112
2112
Return the *l2* norm of *a*, flattened out.
@@ -2116,7 +2116,7 @@ def l2norm(a):
2116
2116
return np .sqrt (np .sum (np .abs (a ) ** 2 ))
2117
2117
2118
2118
2119
- @cbook .deprecated ("2.2" , alternative = 'np .linalg.norm(a.flat, ord=p)' )
2119
+ @cbook .deprecated ("2.2" , alternative = 'numpy .linalg.norm(a.flat, ord=p)' )
2120
2120
def norm_flat (a , p = 2 ):
2121
2121
"""
2122
2122
norm(a,p=2) -> l-p norm of a.flat
@@ -2134,7 +2134,7 @@ def norm_flat(a, p=2):
2134
2134
return np .sum (np .abs (a ) ** p ) ** (1 / p )
2135
2135
2136
2136
2137
- @cbook .deprecated ("2.2" )
2137
+ @cbook .deprecated ("2.2" , 'numpy.arange' )
2138
2138
def frange (xini , xfin = None , delta = None , ** kw ):
2139
2139
"""
2140
2140
frange([start,] stop[, step, keywords]) -> array of floats
@@ -2202,7 +2202,7 @@ def frange(xini, xfin=None, delta=None, **kw):
2202
2202
# end frange()
2203
2203
2204
2204
2205
- @cbook .deprecated ("2.2" )
2205
+ @cbook .deprecated ("2.2" , 'numpy.identity' )
2206
2206
def identity (n , rank = 2 , dtype = 'l' , typecode = None ):
2207
2207
"""
2208
2208
Returns the identity matrix of shape (*n*, *n*, ..., *n*) (rank *r*).
@@ -2268,7 +2268,7 @@ def binary_repr(number, max_length=1025):
2268
2268
return '' .join (map (repr , digits )).replace ('L' , '' )
2269
2269
2270
2270
2271
- @cbook .deprecated ("2.2" )
2271
+ @cbook .deprecated ("2.2" , 'numpy.log2' )
2272
2272
def log2 (x , ln2 = math .log (2.0 )):
2273
2273
"""
2274
2274
Return the log(*x*) in base 2.
@@ -2287,7 +2287,7 @@ def log2(x, ln2=math.log(2.0)):
2287
2287
return len (bin_n )
2288
2288
2289
2289
2290
- @cbook .deprecated ("2.2" )
2290
+ @cbook .deprecated ("2.2" , 'numpy.mod(n, 2)' )
2291
2291
def ispower2 (n ):
2292
2292
"""
2293
2293
Returns the log base 2 of *n* if *n* is a power of 2, zero otherwise.
@@ -2319,7 +2319,7 @@ def isvector(X):
2319
2319
2320
2320
2321
2321
# helpers for loading, saving, manipulating and viewing numpy record arrays
2322
- @cbook .deprecated ("2.2" )
2322
+ @cbook .deprecated ("2.2" , 'numpy.isnan' )
2323
2323
def safe_isnan (x ):
2324
2324
':func:`numpy.isnan` for arbitrary types'
2325
2325
if isinstance (x , six .string_types ):
@@ -2334,7 +2334,7 @@ def safe_isnan(x):
2334
2334
return b
2335
2335
2336
2336
2337
- @cbook .deprecated ("2.2" )
2337
+ @cbook .deprecated ("2.2" , 'numpy.isinf' )
2338
2338
def safe_isinf (x ):
2339
2339
':func:`numpy.isinf` for arbitrary types'
2340
2340
if isinstance (x , six .string_types ):
@@ -3130,7 +3130,7 @@ def csvformat_factory(format):
3130
3130
return format
3131
3131
3132
3132
3133
- @cbook .deprecated ("2.2" , alternative = 'np .recarray.tofile' )
3133
+ @cbook .deprecated ("2.2" , alternative = 'numpy .recarray.tofile' )
3134
3134
def rec2txt (r , header = None , padding = 3 , precision = 3 , fields = None ):
3135
3135
"""
3136
3136
Returns a textual representation of a record array.
@@ -3251,7 +3251,7 @@ def format(item, just_pad_prec_spacer):
3251
3251
return text
3252
3252
3253
3253
3254
- @cbook .deprecated ("2.2" , alternative = 'np .recarray.tofile' )
3254
+ @cbook .deprecated ("2.2" , alternative = 'numpy .recarray.tofile' )
3255
3255
def rec2csv (r , fname , delimiter = ',' , formatd = None , missing = '' ,
3256
3256
missingd = None , withheader = True ):
3257
3257
"""
@@ -3452,7 +3452,7 @@ def griddata(x, y, z, xi, yi, interp='nn'):
3452
3452
##################################################
3453
3453
# Linear interpolation algorithms
3454
3454
##################################################
3455
- @cbook .deprecated ("2.2" , alternative = "np .interp" )
3455
+ @cbook .deprecated ("2.2" , alternative = "numpy .interp" )
3456
3456
def less_simple_linear_interpolation (x , y , xi , extrap = False ):
3457
3457
"""
3458
3458
This function provides simple (but somewhat less so than
0 commit comments