From 5a53abd735a1ced4aa53f5c6fe7c8412a2a77f7e Mon Sep 17 00:00:00 2001 From: Michael Harms Date: Sat, 7 Mar 2026 15:06:45 -0800 Subject: [PATCH] fixing numpy row_stack deprecation --- toyplot/coordinates.py | 2 +- toyplot/html.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toyplot/coordinates.py b/toyplot/coordinates.py index 901617e3..e722ec31 100644 --- a/toyplot/coordinates.py +++ b/toyplot/coordinates.py @@ -591,7 +591,7 @@ def _finalize( self._label_offset = self.label.offset if self.label.offset is not None else 22 self._interactive_coordinates_location = self.interactive.coordinates.location if self.interactive.coordinates.location is not None else _opposite_location(self._tick_labels_location) - endpoints = numpy.row_stack(((x1, y1), (x2, y2))) + endpoints = numpy.vstack(((x1, y1), (x2, y2))) length = numpy.linalg.norm(endpoints[1] - endpoints[0]) self.projection = _create_projection( scale=self.scale, diff --git a/toyplot/html.py b/toyplot/html.py index da29aabf..8da69062 100644 --- a/toyplot/html.py +++ b/toyplot/html.py @@ -760,7 +760,7 @@ def _draw_marker( def _axis_transform(x1, y1, x2, y2, offset, return_length=False): - p = numpy.row_stack(((x1, y1), (x2, y2))) + p = numpy.vstack(((x1, y1), (x2, y2))) basis = p[1] - p[0] length = numpy.linalg.norm(basis) theta = numpy.rad2deg(numpy.arctan2(basis[1], basis[0]))