From 9b8f6c72caea0c6f3fa08b304135239636e4f165 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Thu, 25 Jul 2013 16:10:54 +0200 Subject: DEP: Deprecate that comparisons ignore errors. This means that for example broadcasting errors get raised. The array_equiv function is changed to explicitely test if broadcasting is possible. It may be nice to do this test differently, but I am not sure if that is possible. Create a FutureWarning for comparisons to None, which should result in areal elementwise (object) comparisons. Slightly adepted a wrong test. Poly changes: Some changes in the polycode was necessary, the one is probably a bug fix, the other needs to be thought over, since len check is not perfect maybe, since it is more liekly to raise raise an error. Closes gh-3759 and gh-1608 --- numpy/polynomial/polytemplate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/polynomial') diff --git a/numpy/polynomial/polytemplate.py b/numpy/polynomial/polytemplate.py index 6c60ab3b2..b0006407b 100644 --- a/numpy/polynomial/polytemplate.py +++ b/numpy/polynomial/polytemplate.py @@ -737,7 +737,7 @@ class $name(pu.PolyBase) : then a minimal domain that covers the points `x` is chosen. If ``[]`` the default domain ``$domain`` is used. The default value is $domain in numpy 1.4.x and ``None`` in later versions. - The ``'[]`` value was added in numpy 1.5.0. + The ``[]`` value was added in numpy 1.5.0. rcond : float, optional Relative condition number of the fit. Singular values smaller than this relative to the largest singular value will be @@ -780,10 +780,10 @@ class $name(pu.PolyBase) : """ if domain is None: domain = pu.getdomain(x) - elif domain == []: + elif len(domain) == 0: domain = $domain - if window == []: + if len(window) == 0: window = $domain xnew = pu.mapdomain(x, domain, window) -- cgit v1.2.1