Author: Brian Kearns <[email protected]>
Branch: numpy-refactor
Changeset: r69482:cd1472409d78
Date: 2014-02-26 18:35 -0500
http://bitbucket.org/pypy/pypy/changeset/cd1472409d78/
Log: fix ufunc out arg with scalar
diff --git a/pypy/module/micronumpy/interp_ufuncs.py
b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -321,10 +321,11 @@
w_obj.get_scalar_value().convert_to(space,
calc_dtype))
if out is None:
return w_val
+ w_val = res_dtype.coerce(space, w_val)
if out.is_scalar():
out.set_scalar_value(w_val)
else:
- out.fill(space, res_dtype.coerce(space, w_val))
+ out.fill(space, w_val)
return out
shape = shape_agreement(space, w_obj.get_shape(), out,
broadcast_down=False)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit