Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

BUG: irr function inconsistent behavior on different cpu architecture

未关闭
#131 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

首先,在报告的 CPU 架构上运行提供的两条 npf.irr 命令行,并检查 irr 入口点。当重复调用在不同架构上产生相同结果,并且为复现的情况提供覆盖时,修复才算完成。

由索引模型根据 Issue 内容生成。

描述

Describe the issue:

Hi, I noticed that npf.irr function could return different results on different cpus in some cases. The results would match if i run irr function more than once. Please see example below.

Reproduce the code example:
python -c "import numpy_financial as npf; amount = 37155; month_count = 144; monthly_payment = 560; npf.irr([-amount] + [monthly_payment] * int(month_count));  print(npf.irr([-amount] + [monthly_payment] * int(month_count)))"

python -c "import numpy_financial as npf; amount = 37155; month_count = 144; monthly_payment = 560; print(npf.irr([-amount] + [monthly_payment] * int(month_count)))"
Error message:
On aws ec2 6i instance with Intel Ice Lake, I got the following:
0.01258179635558565
0.01258179635558565

On aws ec2 7i instance with Intel Sapphire Rapids, I got the following:
0.01258179635558565
0.006850691458678115
Runtime information:

1.23.5
3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0]

Context for the issue:

No response

主要语言
Python
星标
410
派生
102
平均合并
13 分钟
30 天内合并 PR
10

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

numpy/numpy-financial 的其他 Issue

查看 numpy/numpy-financial 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。