conversion of SymPy integer to Julia Int fails under Miniconda3
- Lenguaje dominante
- Julia
- Estrellas
- 1.5k
- Forks
- 186
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I cannot convert a `SymPy.jl` integer to Julia (v0.5.2 and v0.6-rc2, 64bit) integer:
```
julia> using SymPy
julia> Int(Sym(1))
ERROR: PyError (PyInt_AsSsize_t)
TypeError('an integer is required',)
in pyerr_check at /home/michele/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
in convert(::Type{Int64}, ::PyCall.PyObject) at /home/michele/.julia/v0.5/PyCall/src/conversions.jl:31
in Int64(::SymPy.Sym) at ./sysimg.jl:53
```
but the conversion to Float64, `Float64(Sym(0))` works.
`PyCall` uses the Miniconda3 installation on the path:
```
julia> Pkg.build("PyCall")
INFO: Building Conda
INFO: Building PyCall
INFO: PyCall is using python (Python 3.6.0) at /home/michele/local/miniconda3/bin/python, libpython = /home/michele/local/miniconda3/lib/libpython3.6m
INFO: /home/michele/.julia/v0.5/PyCall/deps/deps.jl has been updated
INFO: /home/michele/.julia/v0.5/PyCall/deps/PYTHON has been updated
```
The conversion to Julia's integer works using `Miniconda2` and `Conda.jl`.
Ref: JuliaPy/SymPy.jl#159
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with the conversion path shown in PyCall/src/conversions.jl:31 and reproduce Int(Sym(1)) using Julia with the Miniconda3 Python selected by Pkg.build("PyCall"). Compare the failing integer conversion with the working Float64 conversion and the reported Miniconda2 behavior; done means the Julia integer conversion succeeds under Miniconda3.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- julia, python
- Área
- developer-experience
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100