From a4c52faf2dd5b29e0a3067e84816f86340d60939 Mon Sep 17 00:00:00 2001 From: Matteo Pagin Date: Mon, 15 Jul 2024 13:26:43 +0200 Subject: [PATCH] Reflect numpy dtype change from float to float16/64 --- src/tikzplotlib/_legend.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tikzplotlib/_legend.py b/src/tikzplotlib/_legend.py index 4609f80c..8e6e4c70 100644 --- a/src/tikzplotlib/_legend.py +++ b/src/tikzplotlib/_legend.py @@ -122,40 +122,40 @@ def _get_location_from_best(obj): # (or center) of the axes box. # 1. Key points of the legend lower_left_legend = x0_legend - lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float_) - upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float_) + lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float64_) + upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float64_) upper_right_legend = x1_legend center_legend = x0_legend + dimension_legend / 2.0 center_left_legend = np.array( - [x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_ + [x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float64_ ) center_right_legend = np.array( - [x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_ + [x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float64_ ) lower_center_legend = np.array( - [x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float_ + [x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float64_ ) upper_center_legend = np.array( - [x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float_ + [x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float64_ ) # 2. Key points of the axes lower_left_axes = x0_axes - lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float_) - upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float_) + lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float64_) + upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float64_) upper_right_axes = x1_axes center_axes = x0_axes + dimension_axes / 2.0 center_left_axes = np.array( - [x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_ + [x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float64_ ) center_right_axes = np.array( - [x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_ + [x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float64_ ) lower_center_axes = np.array( - [x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float_ + [x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float64_ ) upper_center_axes = np.array( - [x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float_ + [x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float64_ ) # 3. Compute the distances between comparable points.