summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/convertcode.py6
-rw-r--r--numpy/lib/function_base.py14
-rw-r--r--numpy/lib/getlimits.py6
-rw-r--r--numpy/lib/index_tricks.py2
-rw-r--r--numpy/lib/mlab.py4
-rw-r--r--numpy/lib/polynomial.py10
-rw-r--r--numpy/lib/shape_base.py30
-rw-r--r--numpy/lib/src/_compiled_base.c6
-rw-r--r--numpy/lib/test_shape_base.py6
-rw-r--r--numpy/lib/tests/test_function_base.py8
-rw-r--r--numpy/lib/tests/test_getlimits.py8
-rw-r--r--numpy/lib/tests/test_index_tricks.py6
-rw-r--r--numpy/lib/tests/test_polynomial.py6
-rw-r--r--numpy/lib/tests/test_twodim_base.py6
-rw-r--r--numpy/lib/tests/test_type_check.py6
-rw-r--r--numpy/lib/tests/test_ufunclike.py6
-rw-r--r--numpy/lib/type_check.py2
-rw-r--r--numpy/lib/utils.py16
18 files changed, 74 insertions, 74 deletions
diff --git a/numpy/lib/convertcode.py b/numpy/lib/convertcode.py
index aba998f78..6e590fa25 100644
--- a/numpy/lib/convertcode.py
+++ b/numpy/lib/convertcode.py
@@ -1,5 +1,5 @@
-# This module converts code written for Numeric to run with scipy.base
+# This module converts code written for Numeric to run with numpy.base
# Makes the following changes:
# * Converts typecharacters
@@ -97,7 +97,7 @@ def fromstr(filestr):
'numpy.core.umath')
filestr, fromall1 = changeimports(filestr, 'Precision', 'numpy.core')
filestr, fromall2 = changeimports(filestr, 'numerix', 'numpy.core')
- filestr, fromall3 = changeimports(filestr, 'scipy_base', 'numpy.core')
+ filestr, fromall3 = changeimports(filestr, 'numpy_base', 'numpy.core')
filestr, fromall3 = changeimports(filestr, 'MLab', 'numpy.core.mlab')
filestr, fromall3 = changeimports(filestr, 'LinearAlgebra', 'numpy.linalg')
filestr, fromall3 = changeimports(filestr, 'RNG', 'numpy.random')
@@ -110,7 +110,7 @@ def fromstr(filestr):
today = datetime.date.today().strftime('%b %d, %Y')
name = os.path.split(sys.argv[0])[-1]
filestr = '## Automatically adapted for '\
- 'scipy %s by %s\n\n%s' % (today, name, filestr)
+ 'numpy %s by %s\n\n%s' % (today, name, filestr)
return filestr
def makenewfile(name, filestr):
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 60e4b4be0..b7c8c04be 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -479,9 +479,9 @@ def trim_zeros(filt, trim='fb'):
""" Trim the leading and trailing zeros from a 1D array.
Example:
- >>> import scipy
+ >>> import numpy
>>> a = array((0, 0, 0, 1, 2, 3, 2, 1, 0))
- >>> scipy.trim_zeros(a)
+ >>> numpy.trim_zeros(a)
array([1, 2, 3, 2, 1])
"""
first = 0
@@ -583,10 +583,10 @@ class vectorize(object):
Description:
Define a vectorized function which takes nested sequence
- objects or scipy arrays as inputs and returns a
- scipy array as output, evaluating the function over successive
+ objects or numpy arrays as inputs and returns a
+ numpy array as output, evaluating the function over successive
tuples of the input arrays like the python map function except it uses
- the broadcasting rules of scipy.
+ the broadcasting rules of numpy.
Input:
@@ -768,10 +768,10 @@ def hamming(M):
def kaiser(M,beta):
"""kaiser(M, beta) returns a Kaiser window of length M with shape parameter
- beta. It depends on scipy.special (in full scipy) for the modified bessel
+ beta. It depends on numpy.special (in full numpy) for the modified bessel
function i0.
"""
- from scipy.special import i0
+ from numpy.special import i0
n = arange(0,M)
alpha = (M-1)/2.0
return i0(beta * sqrt(1-((n-alpha)/alpha)**2.0))/i0(beta)
diff --git a/numpy/lib/getlimits.py b/numpy/lib/getlimits.py
index 41030af2d..3220d0bab 100644
--- a/numpy/lib/getlimits.py
+++ b/numpy/lib/getlimits.py
@@ -56,21 +56,21 @@ class finfo(object):
lambda v:_frz(v.astype('i'))[0],
lambda v:array(_frz(v)[0],'d'),
lambda v:'%24.16e' % array(_frz(v)[0],'d'),
- 'scipy float precision floating point '\
+ 'numpy float precision floating point '\
'number')
elif dtype is numeric.single:
machar = MachAr(lambda v:array([v],'f'),
lambda v:_frz(v.astype('i'))[0],
lambda v:array(_frz(v)[0],'f'), #
lambda v:'%15.7e' % array(_frz(v)[0],'f'),
- "scipy single precision floating "\
+ "numpy single precision floating "\
"point number")
elif dtype is numeric.longfloat:
machar = MachAr(lambda v:array([v],'g'),
lambda v:_frz(v.astype('i'))[0],
lambda v:array(_frz(v)[0],'g'), #
lambda v:str(array(_frz(v)[0],'g')),
- "scipy longfloat precision floating "\
+ "numpy longfloat precision floating "\
"point number")
else:
raise ValueError,`dtype`
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 71d30a387..e2c8d2a13 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -1,4 +1,4 @@
-## Automatically adapted for scipy Sep 19, 2005 by convertcode.py
+## Automatically adapted for numpy Sep 19, 2005 by convertcode.py
__all__ = ['mgrid','ogrid','r_', 'c_', 'index_exp', 'ix_','ndenumerate']
diff --git a/numpy/lib/mlab.py b/numpy/lib/mlab.py
index 749600d9b..9085c26be 100644
--- a/numpy/lib/mlab.py
+++ b/numpy/lib/mlab.py
@@ -10,5 +10,5 @@ from function_base import msort, median, trapz, diff, cov, corrcoef, kaiser, bla
from oldnumeric import cumsum, ptp, mean, std, prod, cumprod, squeeze
from polynomial import roots
-from scipy.random import rand, randn
-from scipy.corelinalg import eig, svd
+from numpy.random import rand, randn
+from numpy.corelinalg import eig, svd
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index df7013bab..3cebba552 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -17,9 +17,9 @@ eigvals = None
lstsq = None
def get_linalg_funcs():
- "Look for linear algebra functions in scipy"
+ "Look for linear algebra functions in numpy"
global eigvals, lstsq
- from scipy.corelinalg import eigvals, lstsq
+ from numpy.corelinalg import eigvals, lstsq
return
def _eigvals(arg):
@@ -286,9 +286,9 @@ def polymul(a1, a2):
def deconvolve(signal, divisor):
- """Deconvolves divisor out of signal. Requires scipy.signal library
+ """Deconvolves divisor out of signal. Requires numpy.signal library
"""
- import scipy.signal
+ import numpy.signal
num = atleast_1d(signal)
den = atleast_1d(divisor)
N = len(num)
@@ -299,7 +299,7 @@ def deconvolve(signal, divisor):
else:
input = NX.ones(N-D+1, float)
input[1:] = 0
- quot = scipy.signal.lfilter(num, den, input)
+ quot = numpy.signal.lfilter(num, den, input)
rem = num - NX.convolve(den, quot, mode='full')
return quot, rem
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index 8d66b41d1..f4db3f59c 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -203,15 +203,15 @@ def vstack(tup):
tup -- sequence of arrays. All arrays must have the same
shape.
Examples:
- >>> import scipy
+ >>> import numpy
>>> a = array((1,2,3))
>>> b = array((2,3,4))
- >>> scipy.vstack((a,b))
+ >>> numpy.vstack((a,b))
array([[1, 2, 3],
[2, 3, 4]])
>>> a = array([[1],[2],[3]])
>>> b = array([[2],[3],[4]])
- >>> scipy.vstack((a,b))
+ >>> numpy.vstack((a,b))
array([[1],
[2],
[3],
@@ -234,14 +234,14 @@ def hstack(tup):
tup -- sequence of arrays. All arrays must have the same
shape.
Examples:
- >>> import scipy
+ >>> import numpy
>>> a = array((1,2,3))
>>> b = array((2,3,4))
- >>> scipy.hstack((a,b))
+ >>> numpy.hstack((a,b))
array([1, 2, 3, 2, 3, 4])
>>> a = array([[1],[2],[3]])
>>> b = array([[2],[3],[4]])
- >>> scipy.hstack((a,b))
+ >>> numpy.hstack((a,b))
array([[1, 2],
[2, 3],
[3, 4]])
@@ -260,10 +260,10 @@ def column_stack(tup):
tup -- sequence of 1D arrays. All arrays must have the same
length.
Examples:
- >>> import scipy
+ >>> import numpy
>>> a = array((1,2,3))
>>> b = array((2,3,4))
- >>> scipy.column_stack((a,b))
+ >>> numpy.column_stack((a,b))
array([[1, 2],
[2, 3],
[3, 4]])
@@ -285,16 +285,16 @@ def dstack(tup):
tup -- sequence of arrays. All arrays must have the same
shape.
Examples:
- >>> import scipy
+ >>> import numpy
>>> a = array((1,2,3))
>>> b = array((2,3,4))
- >>> scipy.dstack((a,b))
+ >>> numpy.dstack((a,b))
array([ [[1, 2],
[2, 3],
[3, 4]]])
>>> a = array([[1],[2],[3]])
>>> b = array([[2],[3],[4]])
- >>> scipy.dstack((a,b))
+ >>> numpy.dstack((a,b))
array([[ [1, 2]],
[ [2, 3]],
[ [3, 4]]])
@@ -441,9 +441,9 @@ def hsplit(ary,indices_or_sections):
Related:
hstack, split, array_split, vsplit, dsplit.
Examples:
- >>> import scipy
+ >>> import numpy
>>> a= array((1,2,3,4))
- >>> scipy.hsplit(a,2)
+ >>> numpy.hsplit(a,2)
[array([1, 2]), array([3, 4])]
>>> a = array([[1,2,3,4],[1,2,3,4]])
[array([[1, 2],
@@ -489,10 +489,10 @@ def vsplit(ary,indices_or_sections):
Related:
vstack, split, array_split, hsplit, dsplit.
Examples:
- import scipy
+ import numpy
>>> a = array([[1,2,3,4],
... [1,2,3,4]])
- >>> scipy.vsplit(a)
+ >>> numpy.vsplit(a)
[array([ [1, 2, 3, 4]]), array([ [1, 2, 3, 4]])]
"""
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 3ce3743d7..7c20d4f96 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -1,6 +1,6 @@
#include "Python.h"
#include "structmember.h"
-#include "scipy/arrayobject.h"
+#include "numpy/arrayobject.h"
static PyObject *ErrorObject;
#define Py_Try(BOOLEAN) {if (!(BOOLEAN)) goto fail;}
@@ -427,7 +427,7 @@ DL_EXPORT(void) init_compiled_base(void) {
PyObject *m, *d, *s;
/* Create the module and add the functions */
- m = Py_InitModule("scipy.base._compiled_base", methods);
+ m = Py_InitModule("numpy.base._compiled_base", methods);
/* Import the array and ufunc objects */
import_array();
@@ -439,7 +439,7 @@ DL_EXPORT(void) init_compiled_base(void) {
PyDict_SetItemString(d, "__version__", s);
Py_DECREF(s);
- ErrorObject = PyString_FromString("scipy.base._compiled_base.error");
+ ErrorObject = PyString_FromString("numpy.base._compiled_base.error");
PyDict_SetItemString(d, "error", ErrorObject);
Py_DECREF(ErrorObject);
diff --git a/numpy/lib/test_shape_base.py b/numpy/lib/test_shape_base.py
index 005868e96..175bc8584 100644
--- a/numpy/lib/test_shape_base.py
+++ b/numpy/lib/test_shape_base.py
@@ -1,8 +1,8 @@
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;
-from scipy.base import *
+import numpy.base;
+from numpy.base import *
restore_path()
class test_apply_along_axis(ScipyTestCase):
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index fafd75eef..37d3db1bf 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1,10 +1,10 @@
import sys
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;reload(scipy.base)
-from scipy.base import *
+import numpy.base;reload(numpy.base)
+from numpy.base import *
del sys.path[0]
class test_any(ScipyTestCase):
@@ -335,4 +335,4 @@ def compare_results(res,desired):
assert_array_equal(res[i],desired[i])
if __name__ == "__main__":
- ScipyTest('scipy.base.function_base').run()
+ ScipyTest('numpy.base.function_base').run()
diff --git a/numpy/lib/tests/test_getlimits.py b/numpy/lib/tests/test_getlimits.py
index 99a6f5160..5e8706895 100644
--- a/numpy/lib/tests/test_getlimits.py
+++ b/numpy/lib/tests/test_getlimits.py
@@ -1,11 +1,11 @@
""" Test functions for limits module.
"""
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;reload(scipy.base)
-from scipy.base.getlimits import finfo
-from scipy import single,double,longdouble
+import numpy.base;reload(numpy.base)
+from numpy.base.getlimits import finfo
+from numpy import single,double,longdouble
restore_path()
##################################################
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 96e9dff84..c5091909e 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -1,8 +1,8 @@
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;reload(scipy.base)
-from scipy.base import *
+import numpy.base;reload(numpy.base)
+from numpy.base import *
restore_path()
class test_grid(ScipyTestCase):
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py
index 51d4b5707..d37e8b6b9 100644
--- a/numpy/lib/tests/test_polynomial.py
+++ b/numpy/lib/tests/test_polynomial.py
@@ -1,6 +1,6 @@
"""
->>> import scipy.base as nx
->>> from scipy.base.polynomial import poly1d, polydiv
+>>> import numpy.base as nx
+>>> from numpy.base.polynomial import poly1d, polydiv
>>> p = poly1d([1.,2,3])
>>> p
@@ -73,7 +73,7 @@ poly1d([ 2.])
(poly1d([ 1., -1.]), poly1d([ 0.]))
"""
-from scipy.testing import *
+from numpy.testing import *
import doctest
def test_suite(level=1):
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py
index b061d4a5d..329a23f5b 100644
--- a/numpy/lib/tests/test_twodim_base.py
+++ b/numpy/lib/tests/test_twodim_base.py
@@ -2,10 +2,10 @@
"""
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;reload(scipy.base)
-from scipy.base import *
+import numpy.base;reload(numpy.base)
+from numpy.base import *
restore_path()
##################################################
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
index aac24bd6e..e84d86e0c 100644
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -1,10 +1,10 @@
import sys
-from scipy.testing import *
+from numpy.testing import *
set_package_path()
-import scipy.base;reload(scipy.base);reload(scipy.base.type_check)
-from scipy.base import *
+import numpy.base;reload(numpy.base);reload(numpy.base.type_check)
+from numpy.base import *
restore_path()
def assert_all(x):
diff --git a/numpy/lib/tests/test_ufunclike.py b/numpy/lib/tests/test_ufunclike.py
index ca06140c7..f7313526d 100644
--- a/numpy/lib/tests/test_ufunclike.py
+++ b/numpy/lib/tests/test_ufunclike.py
@@ -1,6 +1,6 @@
"""
->>> import scipy.base as nx
->>> import scipy.base.ufunclike as U
+>>> import numpy.base as nx
+>>> import numpy.base.ufunclike as U
Test fix:
>>> a = nx.array([[1.0, 1.1, 1.5, 1.8], [-1.0, -1.1, -1.5, -1.8]])
@@ -53,7 +53,7 @@ array([ 2.169925 , 1.20163386, 2.70043972])
"""
-from scipy.testing import *
+from numpy.testing import *
import doctest
def test_suite(level=1):
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index 4c802ca86..97b7e9832 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -1,4 +1,4 @@
-## Automatically adapted for scipy Sep 19, 2005 by convertcode.py
+## Automatically adapted for numpy Sep 19, 2005 by convertcode.py
__all__ = ['iscomplexobj','isrealobj','imag','iscomplex',
'isscalar',
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 19fb18d4d..be5a34295 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -1,6 +1,6 @@
from numerictypes import obj2dtype
-__all__ = ['issubclass_', 'get_scipy_include', 'issubdtype']
+__all__ = ['issubclass_', 'get_numpy_include', 'issubdtype']
def issubclass_(arg1, arg2):
try:
@@ -11,18 +11,18 @@ def issubclass_(arg1, arg2):
def issubdtype(arg1, arg2):
return issubclass(obj2dtype(arg1), obj2dtype(arg2))
-def get_scipy_include():
- """Return the directory in the package that contains the scipy/*.h header
+def get_numpy_include():
+ """Return the directory in the package that contains the numpy/*.h header
files.
- Extension modules that need to compile against scipy.base should use this
+ Extension modules that need to compile against numpy.base should use this
function to locate the appropriate include directory. Using distutils:
- import scipy
+ import numpy
Extension('extension_name', ...
- include_dirs=[scipy.get_scipy_include()])
+ include_dirs=[numpy.get_numpy_include()])
"""
- from scipy.distutils.misc_util import get_scipy_include_dirs
- include_dirs = get_scipy_include_dirs()
+ from numpy.distutils.misc_util import get_numpy_include_dirs
+ include_dirs = get_numpy_include_dirs()
assert len(include_dirs)==1,`include_dirs`
return include_dirs[0]