conversion of SymPy integer to Julia Int fails under Miniconda3
- Langage dominant
- Julia
- Étoiles
- 1.5k
- Forks
- 186
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- julia, python
- Domaine
- developer-experience
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100