[ENH]: 是否在适当的地方使用 `IndexError` 而不是 `ValueError`?
作者: prady0t创建于 2026年8月29日更新于 2026年9月10日
标签enhancementlow prioritypython
☑️ 我知道严禁使用 AI 来编写问题。 根据 建议,expand_dims 等函数在轴无效时会抛出 ValueError,但它们更适合抛出 IndexError。
内容来源: ml-explore/mlx
☑️ 我知道严禁使用 AI 来编写问题。 根据 建议,expand_dims 等函数在轴无效时会抛出 ValueError,但它们更适合抛出 IndexError。
内容来源: ml-explore/mlx