Skip to content

Commit d4eee4a

Browse files
mishushakovclaude
andcommitted
Fix numpy 2.x Decimal conversion in pie chart extraction
numpy.float32 no longer implicitly converts to Decimal in numpy 2.x. Wrap with float() before passing to Decimal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 160195a commit d4eee4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • chart_data_extractor/e2b_charts/charts

chart_data_extractor/e2b_charts/charts/pie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _extract_info(self, ax: Axes) -> None:
2525
for wedge in ax.patches:
2626
pie_data = PieData(
2727
label=wedge.get_label(),
28-
angle=abs(dynamic_round(Decimal(wedge.theta2) - Decimal(wedge.theta1))),
28+
angle=abs(dynamic_round(Decimal(float(wedge.theta2)) - Decimal(float(wedge.theta1)))),
2929
radius=wedge.r,
3030
)
3131

0 commit comments

Comments
 (0)