[pypy-commit] pypy default: fix 2301f0bf4a68
rlamy
noreply at buildbot.pypy.org
Thu Apr 23 04:25:05 CEST 2015
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r76896:a007e985b031
Date: 2015-04-23 03:24 +0100
http://bitbucket.org/pypy/pypy/changeset/a007e985b031/
Log: fix 2301f0bf4a68
diff --git a/pypy/module/micronumpy/descriptor.py b/pypy/module/micronumpy/descriptor.py
--- a/pypy/module/micronumpy/descriptor.py
+++ b/pypy/module/micronumpy/descriptor.py
@@ -545,13 +545,13 @@
space.gettypefor(boxes.W_VoidBox),
shape=shape, subdtype=subdtype, elsize=size)
- if space.isinstance_w(w_dtype, space.w_unicode):
- w_dtype = space.wrap(space.str_w(w_dtype)) # may raise if invalid
if space.is_none(w_dtype):
return cache.w_float64dtype
- elif space.isinstance_w(w_dtype, w_subtype):
+ if space.isinstance_w(w_dtype, w_subtype):
return w_dtype
- elif space.isinstance_w(w_dtype, space.w_str):
+ if space.isinstance_w(w_dtype, space.w_unicode):
+ w_dtype = space.wrap(space.str_w(w_dtype)) # may raise if invalid
+ if space.isinstance_w(w_dtype, space.w_str):
name = space.str_w(w_dtype)
if _check_for_commastring(name):
return dtype_from_spec(space, w_dtype)
More information about the pypy-commit
mailing list