[Python] pathlib: Improve compatibility with python
维护者通常 1 天内回复
@vepadulano 已经在做这个了。
开始于 2025年11月24日。
评估
这个 Issue 还没有评估数据。
描述
Check duplicate issues.
- Checked for duplicates
Description
I see all over the place problems when I try to use ROOT with python. This time I see that there is no support for Path objects.
Reproducer
import ROOT
from pathlib import Path
import numpy as np
root_file = ROOT.TFile("example_data.root", "RECREATE")
tree = ROOT.TTree("myTree", "Example Tree")
x = np.zeros(1, dtype=float)
y = np.zeros(1, dtype=float)
z = np.zeros(1, dtype=float)
tree.Branch("x", x, "x/D")
tree.Branch("y", y, "y/D")
tree.Branch("z", z, "z/D")
for i in range(10):
x[0] = i
y[0] = i * 2 + np.random.normal(0, 1)
z[0] = x[0]**2 + y[0]
tree.Fill()
tree.Write()
root_file.Close()
file_path = Path("example_data.root")
df = ROOT.RDataFrame("myTree", file_path)
ROOT version
6.36.04
Installation method
mamba
Operating system
almalinux 9
Additional context
Any good out there uses Path, not strings when handling paths.
- 主要语言
- C++
- 星标
- 3.3k
- 派生
- 1.6k
- 平均合并
- 2 天 14 小时
- 30 天内合并 PR
- 192
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
root-project/root 的其他 Issue
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newline可能已有人在做 @dpiparo 于 8 天前认领。 未关闭bug in:Build System
难度 2/5 1-3 小时 新手友好度 86/100
root-project/root#23746 · 已指派 1 人 ·
维护者通常 1 天内回复
-
RDataLoader: wrong train/validation split with lazy loading, filtered inputs and shuffle=False可能已有人在做 @siliataider 于 1 天前认领。 未关闭bug in:ML
root-project/root#23842 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[graph] TScatter / TScatter2D stops drawing remaining points if a non-positive value is encountered in log scale可能已有人在做 @muntasir-396 于 2 天前认领。 未关闭bug good first issue in:Graphics
root-project/root#23833 · 1 条评论 ·
维护者通常 1 天内回复
-
TDataMember::GetOffset interfers to TDataMember::GetOffsetCint可能已有人在做 @pcanal 于 5 天前认领。 未关闭bug in:Core Libraries
难度 4/5 3-5 天 新手友好度 48/100
root-project/root#23777 · 已指派 1 人 ·
维护者通常 1 天内回复
-
`TChain::GetEntries` internal caching ineffective?可能已有人在做 @pcanal 于 11 天前认领。 未关闭improvement in:TTree
root-project/root#23738 · 6 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 root-project/root 的全部 Issue
相似的 Issue
-
bug intrinsic medium priority rt_lib
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
OpenPrinting/splix#33 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
sumatrapdfreader/sumatrapdf#6417 · 3 条评论 ·
-
[BUG] Cython cache evicts most recent instead of oldest entry on cleanup可能已有人在做 @scoder 今天认领。 未关闭Build System defect
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100