diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 5a7c83ccbc06..65a4ccb6d950 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1506,8 +1506,8 @@ def get_transform(self): points_transform.transform([self._xy1, self._xy2]) dx = x2 - x1 dy = y2 - y1 - if np.allclose(x1, x2): - if np.allclose(y1, y2): + if dx == 0: + if dy == 0: raise ValueError( f"Cannot draw a line through two identical points " f"(x={(x1, x2)}, y={(y1, y2)})") pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy