Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aed15da

Browse files
committed
Remove mlab.get_sparse_matrix
1 parent 3867b78 commit aed15da

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

doc/api/next_api_changes/2018-09-18-DS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ in Matplotlib 2.2 has been removed. See below for a list:
1818
- `mlab.rk4` (use scipy.integrate.ode instead)
1919
- `mlab.bivariate_normal`
2020
- `mlab.get_xyz_where`
21+
- `mlab.get_sparse_matrix`
2122
- `mlab.donothing_callback`

lib/matplotlib/mlab.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,20 +1194,6 @@ def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning,
11941194
return Cxy, f
11951195

11961196

1197-
@cbook.deprecated('2.2')
1198-
def get_sparse_matrix(M, N, frac=0.1):
1199-
"""
1200-
Return a *M* x *N* sparse matrix with *frac* elements randomly
1201-
filled.
1202-
"""
1203-
data = np.zeros((M, N))*0.
1204-
for i in range(int(M*N*frac)):
1205-
x = np.random.randint(0, M-1)
1206-
y = np.random.randint(0, N-1)
1207-
data[x, y] = np.random.rand()
1208-
return data
1209-
1210-
12111197
@cbook.deprecated('2.2', 'numpy.hypot')
12121198
def dist(x, y):
12131199
"""

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
amap, base_repr, binary_repr, csv2rec,
234234
demean, detrend, detrend_linear, detrend_mean, detrend_none, dist,
235235
dist_point_to_segment, distances_along_curve, exp_safe,
236-
fftsurr, frange, get_sparse_matrix, griddata,
236+
fftsurr, frange, griddata,
237237
identity, inside_poly, is_closed_polygon, ispower2, isvector, l1norm,
238238
l2norm, log2, movavg, norm_flat,
239239
path_length, poly_below, poly_between,

0 commit comments

Comments
 (0)