summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/lib/function_base.py8
-rw-r--r--numpy/lib/shape_base.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 778aa1e09..2087813a1 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -13,7 +13,7 @@ __all__ = ['logspace', 'linspace',
import types
import numpy.core.numeric as _nx
from numpy.core.numeric import ones, zeros, arange, concatenate, array, \
- asarray, empty, empty_like, asanyarray, ndarray
+ asarray, asanyarray, empty, empty_like, asanyarray, ndarray
from numpy.core.numeric import ScalarType, dot, where, newaxis
from numpy.core.umath import pi, multiply, add, arctan2, \
frompyfunc, isnan, cos, less_equal, sqrt, sin, mod, exp
@@ -365,8 +365,8 @@ def diff(a, n=1, axis=-1):
if n == 0:
return a
if n < 0:
- raise ValueError, 'order must be non-negative but got ' + `n`
- a = asarray(a)
+ raise ValueError, 'order must be non-negative but got ' + repr(n)
+ a = asanyarray(a)
nd = len(a.shape)
slice1 = [slice(None)]*nd
slice2 = [slice(None)]*nd
@@ -835,7 +835,7 @@ def sinc(x):
return sin(y)/y
def msort(a):
- b = array(a,copy=True)
+ b = array(a,subok=True,copy=True)
b.sort(0)
return b
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index f313028f1..df0e9876d 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -121,7 +121,7 @@ def atleast_1d(*arys):
"""
res = []
for ary in arys:
- res.append(array(ary,copy=False,ndmin=1))
+ res.append(array(ary,copy=False,subok=True,ndmin=1))
if len(res) == 1:
return res[0]
else:
@@ -141,7 +141,7 @@ def atleast_2d(*arys):
"""
res = []
for ary in arys:
- res.append(array(ary,copy=False,ndmin=2))
+ res.append(array(ary,copy=False,subok=2,ndmin=2))
if len(res) == 1:
return res[0]
else: