diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2014-01-26 17:16:10 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2014-05-04 21:06:17 +0200 |
commit | f40831a53ff2d572f338b1445e40bc88a1167ce7 (patch) | |
tree | 3c48af9cc441a9c809d8ac995f659f391b81b6ce /numpy/polynomial/_polybase.py | |
parent | 17e9ff8fd67f41f0328b3963d46bbbe849bf7fbb (diff) | |
download | numpy-f40831a53ff2d572f338b1445e40bc88a1167ce7.tar.gz |
MAINT: Comparison deprecation followup fixes
Makes the identity check `a = np.array([np.nan], dtype=object)`
`a == a`, etc. a deprecation/futurewarning instead of just
changing it.
Also fixes some smaller things.
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 83119579c..23608c74a 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -438,6 +438,7 @@ class ABCPolyBase(object): res = (isinstance(other, self.__class__) and np.all(self.domain == other.domain) and np.all(self.window == other.window) and + (self.coef.shape == other.coef.shape) and np.all(self.coef == other.coef)) return res @@ -792,7 +793,7 @@ class ABCPolyBase(object): """ if domain is None: domain = pu.getdomain(x) - elif isinstance(domain, list) and len(domain) == 0: + elif type(domain) is list and len(domain) == 0: domain = cls.domain if window is None: @@ -836,7 +837,7 @@ class ABCPolyBase(object): [roots] = pu.as_series([roots], trim=False) if domain is None: domain = pu.getdomain(roots) - elif isinstance(domain, list) and len(domain) == 0: + elif type(domain) is list and len(domain) == 0: domain = cls.domain if window is None: |