Skip to content

Conversation

TingquanGao
Copy link
Collaborator

修复 _format_data 函数未处理 numpy 整数类型(np.int32, np.int64)的问题, 防止 OCR 结果中包含 numpy 整数坐标时出现 JSON 序列化错误。

修复内容:

  • 添加对 np.int32 和 np.int64 类型的支持
  • 将 numpy 整数转换为 Python 原生 int 类型
  • 扩展 np.float64 支持以保持类型处理一致性

Fixes JSON serialization errors when OCR results contain numpy integer coordinates.

🤖 Generated with Claude Code Co-Authored- Claude [email protected]

修复 _format_data 函数未处理 numpy 整数类型(np.int32, np.int64)的问题,
防止 OCR 结果中包含 numpy 整数坐标时出现 JSON 序列化错误。

修复内容:
- 添加对 np.int32 和 np.int64 类型的支持
- 将 numpy 整数转换为 Python 原生 int 类型
- 扩展 np.float64 支持以保持类型处理一致性

Fixes JSON serialization errors when OCR results contain numpy integer coordinates.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored- Claude <[email protected]>
Copy link

paddle-bot bot commented Sep 24, 2025

Thanks for your contribution!

1 similar comment
Copy link

paddle-bot bot commented Sep 24, 2025

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants