JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.47k stars 189 forks source link

PyCall hangs when tensorly returns NDarray objects #600

Closed montyvesselinov closed 6 years ago

montyvesselinov commented 6 years ago

this works:

import PyCall

@PyCall.pyimport tensorly as tl
@PyCall.pyimport tensorly.decomposition as td

tl.set_backend("numpy")
T_orig_tl = tl.backend[:tensor](rand(5,10,15))
td.non_negative_tucker(T_orig_tl, rank=[2,2,2])

However, this fails and makes julia to hang forever:

import PyCall

@PyCall.pyimport tensorly as tl
@PyCall.pyimport tensorly.decomposition as td

tl.set_backend("mxnet")
T_orig_tl = tl.backend[:tensor](rand(5,10,15))
td.non_negative_tucker(T_orig_tl, rank=[2,2,2])
montyvesselinov commented 6 years ago

ENV["PYTHON"]="/usr/local/bin/python3" fixes the problem.

not sure why Conda python does not like it.