using PyPlot;
x = range(0,1,length=100);
plot(x, x);
forward(x) = x^(1/3);
inverse(x) = x^3;
xscale("function",functions=(forward,inverse));
I got errors. Some of the errors are
ERROR: (in a Julia function called from Python)
JULIA: DimensionMismatch("matrix is not square: dimensions are (2, 1)")
.....
RuntimeError: <PyCall.jlwrap (in a Julia function called from Python)
JULIA: DimensionMismatch("matrix is not square: dimensions are (0, 1)")
I think you want x .^ (1/3) and x .^ 3. Python is calling your functions for arrays, but in Julia, the ^ function is not element-wise unless you prepend a ..
using PyPlot; x = range(0,1,length=100); plot(x, x); forward(x) = x^(1/3); inverse(x) = x^3; xscale("function",functions=(forward,inverse));
I got errors. Some of the errors are
ERROR: (in a Julia function called from Python) JULIA: DimensionMismatch("matrix is not square: dimensions are (2, 1)") ..... RuntimeError: <PyCall.jlwrap (in a Julia function called from Python) JULIA: DimensionMismatch("matrix is not square: dimensions are (0, 1)")
Can you help? Thanks!