Author: Alex Gaynor <[email protected]>
Branch: 
Changeset: r50079:87235ee9b8ab
Date: 2011-12-02 16:31 -0500
http://bitbucket.org/pypy/pypy/changeset/87235ee9b8ab/

Log:    Preset correct attributes on scalars, so that a call to calc_strides
        isn't emitted

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
@@ -798,6 +798,7 @@
     _attrs_ = ["dtype", "value", "shape"]
 
     def __init__(self, dtype, value):
+        self.shape = self.strides = []
         BaseArray.__init__(self, [], 'C')
         self.dtype = dtype
         self.value = value
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to