JuliaPy / JuliaPy/PythonCall.jl

Weird behavior importing lists from python to Julia

未关闭
#341 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Julia
星标
1.1k
派生
86
平均合并
1 天 22 小时
30 天内合并 PR
3

描述

**Affects:** JuliaCall

**Describe the bug**
I'm getting weird crashes when I transfer a list from Python to Julia. This does not happen with PyJulia. Minimum working example below.

```
>>> from juliacall import Main as jl
>>> jl.x = [1., 2.]
>>> jl.seval("show(x)")
Any["s", "h", "o", "w", "(", "x", ")"]

>>> jl.x = 1
>>> jl.seval("show(x)")
1

>>> from julia import Main
>>> Main.x = [1., 2.]
>>> Main.eval("show(x)")
[1.0, 2.0]
```
**Your system**
- Windows 11 Pro 22H2
- Julia 1.9.2; Python 3.11, JuliaCall 0.9.13

```
C:\Users\drood>pip list
Package Version
---------------- -------
fortls 2.13.0
json5 0.9.14
julia 0.6.1
juliacall 0.9.13
juliapkg 0.1.10
numpy 1.25.0
packaging 23.1
pip 23.2
psutil 5.9.5
semantic-version 2.10.0
setuptools 65.5.0
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by reproducing the Python-to-Julia list transfer with the provided JuliaCall and PyJulia examples on the stated versions. Inspect the conversion path for Python lists and compare the resulting Julia value with the scalar case; done means lists transfer without producing the shown character array or crashing, with regression coverage added if the relevant test location is found.

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

评估

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

把新 issue 发到你的邮箱

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