Author: Matti Picus <[email protected]>
Branch: str-dtype-improvement
Changeset: r62558:7341166639d1
Date: 2013-03-20 12:06 -0700
http://bitbucket.org/pypy/pypy/changeset/7341166639d1/
Log: remove redundant check
diff --git a/pypy/module/micronumpy/interp_arrayops.py
b/pypy/module/micronumpy/interp_arrayops.py
--- a/pypy/module/micronumpy/interp_arrayops.py
+++ b/pypy/module/micronumpy/interp_arrayops.py
@@ -131,8 +131,6 @@
arr.get_dtype())
if _axis < 0 or len(arr.get_shape()) <= _axis:
raise operationerrfmt(space.w_IndexError, "axis %d out of bounds
[0, %d)", axis, len(shape))
- if _axis < 0 or len(shape) <= _axis:
- raise operationerrfmt(space.w_IndexError, "axis %d out of bounds [0,
%d)", axis, len(shape))
res = W_NDimArray.from_shape(shape, dtype, 'C')
chunks = [Chunk(0, i, 1, i) for i in shape]
axis_start = 0
diff --git a/pypy/module/micronumpy/interp_numarray.py
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -265,10 +265,7 @@
def descr_get_imag(self, space):
ret = self.implementation.get_imag(self)
- if ret:
- return W_NDimArray(ret)
- raise OperationError(space.w_NotImplementedError,
- space.wrap('imag not implemented for this dtype'))
+ return W_NDimArray(ret)
def descr_set_real(self, space, w_value):
# copy (broadcast) values into self
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit