diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-12-24 16:08:22 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-01-09 11:03:08 -0700 |
commit | 3c2603f1fe11ef6bc44de1160a7ab43325a35883 (patch) | |
tree | 73f5bc5a248a91afdd398285c6d2370ff1d69af9 /numpy/polynomial/polytemplate.py | |
parent | 2986478463127f4b32d22d80570219a0007898ab (diff) | |
download | numpy-3c2603f1fe11ef6bc44de1160a7ab43325a35883.tar.gz |
HACK: Make __array_priority__ = 1000.
This works around changes in the treatment of __array_priority__ that
were part of commit 32b32c2. Previously the rop's of the right hand
object were called whenever it had the __array_priority__ attribute
and was not an ndarray or derived thereof. After the change the
object needed to have greater priority, in this case > 0. It isn't
clear that the new behavior is the correct one and if it is reverted
then setting __array_priority__ back to 0 will provide a test for that
decision.
Diffstat (limited to 'numpy/polynomial/polytemplate.py')
-rw-r--r-- | numpy/polynomial/polytemplate.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/polynomial/polytemplate.py b/numpy/polynomial/polytemplate.py index d8db00f15..25a20a552 100644 --- a/numpy/polynomial/polytemplate.py +++ b/numpy/polynomial/polytemplate.py @@ -80,7 +80,7 @@ class $name(pu.PolyBase) : # Default window window = np.array($domain) # Don't let participate in array operations. Value doesn't matter. - __array_priority__ = 0 + __array_priority__ = 1000 def has_samecoef(self, other): """Check if coefficients match. @@ -319,6 +319,7 @@ class $name(pu.PolyBase) : try : quo, rem = ${nick}div(self.coef, other) except : + print 'hi' return NotImplemented quo = self.__class__(quo, self.domain, self.window) rem = self.__class__(rem, self.domain, self.window) @@ -555,7 +556,7 @@ class $name(pu.PolyBase) : applied to the input arguments before the series is evaluated. The map depends on the ``domain`` and ``window``; if the current ``domain`` is equal to the ``window`` the resulting map is the - identity. If the coeffients of the ``$name`` instance are to be + identity. If the coefficients of the ``$name`` instance are to be used by themselves outside this class, then the linear function must be substituted for the ``x`` in the standard representation of the base polynomials. |