Skip to content

Commit 6f7bee6

Browse files
committed
Reflect numpy dtype change from float to float16/32/64
1 parent 822e414 commit 6f7bee6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/tikzplotlib/_legend.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,40 +122,40 @@ def _get_location_from_best(obj):
122122
# (or center) of the axes box.
123123
# 1. Key points of the legend
124124
lower_left_legend = x0_legend
125-
lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float_)
126-
upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float_)
125+
lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float32)
126+
upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float32)
127127
upper_right_legend = x1_legend
128128
center_legend = x0_legend + dimension_legend / 2.0
129129
center_left_legend = np.array(
130-
[x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_
130+
[x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float32
131131
)
132132
center_right_legend = np.array(
133-
[x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_
133+
[x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float32
134134
)
135135
lower_center_legend = np.array(
136-
[x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float_
136+
[x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float32
137137
)
138138
upper_center_legend = np.array(
139-
[x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float_
139+
[x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float32
140140
)
141141

142142
# 2. Key points of the axes
143143
lower_left_axes = x0_axes
144-
lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float_)
145-
upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float_)
144+
lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float32)
145+
upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float32)
146146
upper_right_axes = x1_axes
147147
center_axes = x0_axes + dimension_axes / 2.0
148148
center_left_axes = np.array(
149-
[x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_
149+
[x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float32
150150
)
151151
center_right_axes = np.array(
152-
[x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_
152+
[x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float32
153153
)
154154
lower_center_axes = np.array(
155-
[x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float_
155+
[x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float32
156156
)
157157
upper_center_axes = np.array(
158-
[x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float_
158+
[x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float32
159159
)
160160

161161
# 3. Compute the distances between comparable points.

0 commit comments

Comments
 (0)