@@ -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' )
12681209def safe_isnan (x ):
0 commit comments