-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
Affects: Both (easier to reproduce with PythonCall, but I actually hit it using JuliaCall)
Describe the bug
x .* y where x is a Py wrapping a numpy array and y is a Matrix gives strange (buggy) results. Converting to a PyArray is a workaround:
julia> pyexec("import numpy as np", Main)
julia> x = pyeval("np.array([[1,2],[3,4]])", Main)
Python:
array([[1, 2],
[3, 4]])
julia> y = rand(2,2);
julia> x .* y # BUG
2×2 Matrix{Py}:
array([0.58564244, 1.17128489]) array([0.33111401, 0.66222801])
array([2.77225103, 3.69633471]) array([0.94132148, 1.25509531])
julia> pyconvert(Any, x) .* y
2×2 Matrix{Float64}:
0.585642 0.662228
2.77225 1.2551Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request