summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/release/upcoming_changes/18963.expired.rst8
-rw-r--r--numpy/polynomial/polyutils.py50
-rw-r--r--numpy/polynomial/polyutils.pyi5
3 files changed, 10 insertions, 53 deletions
diff --git a/doc/release/upcoming_changes/18963.expired.rst b/doc/release/upcoming_changes/18963.expired.rst
new file mode 100644
index 000000000..d93b8a06a
--- /dev/null
+++ b/doc/release/upcoming_changes/18963.expired.rst
@@ -0,0 +1,8 @@
+Remove deprecated ``PolyBase`` and unused ``PolyError`` and ``PolyDomainError``
+-------------------------------------------------------------------------------
+
+The class ``PolyBase`` has been removed (deprecated in numpy 1.9.0). Please use
+the abstract ``ABCPolyBase`` class instead.
+
+Furthermore, the unused ``PolyError`` and ``PolyDomainError`` exceptions are
+removed from the `numpy.polynomial`.
diff --git a/numpy/polynomial/polyutils.py b/numpy/polynomial/polyutils.py
index 01879ecbc..3b0f0a9e5 100644
--- a/numpy/polynomial/polyutils.py
+++ b/numpy/polynomial/polyutils.py
@@ -4,15 +4,6 @@ Utility classes and functions for the polynomial modules.
This module provides: error and warning objects; a polynomial base class;
and some routines used in both the `polynomial` and `chebyshev` modules.
-Error objects
--------------
-
-.. autosummary::
- :toctree: generated/
-
- PolyError base class for this sub-package's errors.
- PolyDomainError raised when domains are mismatched.
-
Warning objects
---------------
@@ -21,14 +12,6 @@ Warning objects
RankWarning raised in least-squares fit for rank-deficient matrix.
-Base class
-----------
-
-.. autosummary::
- :toctree: generated/
-
- PolyBase Obsolete base class for the polynomial classes. Do not use.
-
Functions
---------
@@ -50,8 +33,8 @@ import warnings
import numpy as np
__all__ = [
- 'RankWarning', 'PolyError', 'PolyDomainError', 'as_series', 'trimseq',
- 'trimcoef', 'getdomain', 'mapdomain', 'mapparms', 'PolyBase']
+ 'RankWarning', 'as_series', 'trimseq',
+ 'trimcoef', 'getdomain', 'mapdomain', 'mapparms']
#
# Warnings and Exceptions
@@ -61,35 +44,6 @@ class RankWarning(UserWarning):
"""Issued by chebfit when the design matrix is rank deficient."""
pass
-class PolyError(Exception):
- """Base class for errors in this module."""
- pass
-
-class PolyDomainError(PolyError):
- """Issued by the generic Poly class when two domains don't match.
-
- This is raised when an binary operation is passed Poly objects with
- different domains.
-
- """
- pass
-
-#
-# Base class for all polynomial types
-#
-
-class PolyBase:
- """
- Base class for all polynomial types.
-
- Deprecated in numpy 1.9.0, use the abstract
- ABCPolyBase class instead. Note that the latter
- requires a number of virtual functions to be
- implemented.
-
- """
- pass
-
#
# Helper functions to convert inputs to 1-D arrays
#
diff --git a/numpy/polynomial/polyutils.pyi b/numpy/polynomial/polyutils.pyi
index 0befa740e..52c9cfc4a 100644
--- a/numpy/polynomial/polyutils.pyi
+++ b/numpy/polynomial/polyutils.pyi
@@ -3,11 +3,6 @@ from typing import List
__all__: List[str]
class RankWarning(UserWarning): ...
-class PolyError(Exception): ...
-class PolyDomainError(PolyError): ...
-
-# NOTE: Deprecated
-# class PolyBase: ...
def trimseq(seq): ...
def as_series(alist, trim=...): ...