Steven G. Johnson

Results 1086 comments of Steven G. Johnson

Probably some environment variable like PYTHONPATH is messing things up. I would check your environment for python-related variables.

If you want to leave it as a Python object, you can do so by using `pycall`. i.e. `pycall(function_returning_named_tuple, PyObect, args....)`

Julia doesn't have named tuples, so the alternatives here are - Current behavior: Default to converting to a Julia tuple, require an explicit `PyObject` if you want to keep it...

Rory, you need to get the `PyObject` of `my_python_func` to start with. If you get the Julia wrapper, function, then convert it back to a `PyObject`, it won't work because...

Now that Julia 0.7 has a `NamedTuple` type ([#22194](https://github.com/JuliaLang/julia/pull/22194)), it should be possible to fully support bidirectional conversion to/from Python named tuples.

In general, we're trying to move away from more automatic conversions and just make it easier to use the `PyObject` as-is. On the other hand, explicitly calling `NamedTuple(o)` or `convert(NamedTuple,...

One possibility would be for `getindex` to call `slice` automatically when it is passed a range. Will have to wait until #629 though, since we need to first change the...

See my comment here: https://github.com/JuliaPy/PyCall.jl/issues/882#issuecomment-786266352 I think we probably need to copy [the FFTW.jl solution](https://github.com/JuliaMath/FFTW.jl/blob/2c20abe7098a2380fa37fe021b3d21fc593059ec/src/fft.jl#L275-L325) here, which was rather painfully developed with the help of @vtjnash. (I wonder if we...

Hmm, I'm not sure we can factor the FFTW.jl solution that cleanly into a package, since `trylock(fftwlock)` probably needs to be replaced with the GIL lock (or we need to...

Reading the [Python documentation](https://docs.python.org/3/c-api/init.html) some more, it seems like the solution may be simpler — we're not really allowed to call Python from anything other than the main thread unless...