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

Skip to content

Commit dedc269

Browse files
committed
Remove mlab.isvector
1 parent a934ad8 commit dedc269

3 files changed

Lines changed: 1 addition & 60 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
1717
- `mlab.binary_repr`
1818
- `mlab.ispower2`
1919
- `mlab.log2` (use numpy.log2 instead)
20+
- `mlab.isvector`
2021
- `mlab.cohere_pairs` (use scipy.signal.coherence instead)
2122
- `mlab.entropy` (use scipy.stats.entropy instead)
2223
- `mlab.normpdf` (use scipy.stats.norm.pdf instead)

lib/matplotlib/mlab.py

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,65 +1204,6 @@ def movavg(x, n):
12041204
return np.convolve(x, w, mode='valid')
12051205

12061206

1207-
# the following code was written and submitted by Fernando Perez
1208-
# from the ipython numutils package under a BSD license
1209-
# begin fperez functions
1210-
1211-
"""
1212-
A set of convenient utilities for numerical work.
1213-
1214-
Most of this module requires numpy or is meant to be used with it.
1215-
1216-
Copyright (c) 2001-2004, Fernando Perez. <[email protected]>
1217-
All rights reserved.
1218-
1219-
This license was generated from the BSD license template as found in:
1220-
http://www.opensource.org/licenses/bsd-license.php
1221-
1222-
Redistribution and use in source and binary forms, with or without
1223-
modification, are permitted provided that the following conditions are met:
1224-
1225-
* Redistributions of source code must retain the above copyright notice,
1226-
this list of conditions and the following disclaimer.
1227-
1228-
* Redistributions in binary form must reproduce the above copyright
1229-
notice, this list of conditions and the following disclaimer in the
1230-
documentation and/or other materials provided with the distribution.
1231-
1232-
* Neither the name of the IPython project nor the names of its
1233-
contributors may be used to endorse or promote products derived from
1234-
this software without specific prior written permission.
1235-
1236-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1237-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1238-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1239-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
1240-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1241-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1242-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1243-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1244-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1245-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1246-
1247-
"""
1248-
1249-
1250-
@cbook.deprecated("2.2")
1251-
def isvector(X):
1252-
"""
1253-
Like the MATLAB function with the same name, returns *True*
1254-
if the supplied numpy array or matrix *X* looks like a vector,
1255-
meaning it has a one non-singleton axis (i.e., it can have
1256-
multiple axes, but all must have length 1, except for one of
1257-
them).
1258-
1259-
If you just want to see if the array has 1 axis, use X.ndim == 1.
1260-
"""
1261-
return np.prod(X.shape) == np.max(X.shape)
1262-
1263-
# end fperez numutils code
1264-
1265-
12661207
# helpers for loading, saving, manipulating and viewing numpy record arrays
12671208
@cbook.deprecated("2.2", 'numpy.isnan')
12681209
def safe_isnan(x):

lib/matplotlib/pylab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@
231231
from matplotlib.mlab import (
232232
csv2rec,
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234-
isvector,
235234
movavg,
236235
window_hanning, window_none)
237236

0 commit comments

Comments
 (0)