-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create_array(::Type{ReshapedArray}, ...)
doesn't work
#644
Comments
I have the same problem and, unfortunately, adding this doesn't seem to fix it: function create_array(::Type{<:Base.ReshapedArray{T, N, P}}, S, nd::Val, d::Val, elems...) where {T, N, P}
create_array(P, S, nd, d, elems...)
end In that case I just get: ERROR: MethodError: no method matching create_array(::Type{Symbolics.Arr{Symbolics.Num, 1}}, ::Nothing, ::Val{2}, ::Val{(2, 1)}, ::Symbolics.Num, ::Symbolics.Num)
The function `create_array` exists, but no method is defined for this combination of argument types.
Closest candidates are:
create_array(::Type{<:Base.ReshapedArray{T, N, P}}, ::Any, ::Val, ::Val, ::Any...) where {T, N, P}
@ GeometricMachineLearning ~/Documents/GeometricMachineLearning/src/pullbacks/zygote_pullback.jl:42
create_array(::Type{<:SubArray{T, N, P, I, L}}, ::Any, ::Val, ::Val, ::Any...) where {T, N, P, I, L}
@ SymbolicUtils ~/.julia/packages/SymbolicUtils/jf8aQ/src/code.jl:546
create_array(::Type{<:Array}, ::Any, ::Val, ::Val, ::Any...)
@ SymbolicUtils ~/.julia/packages/SymbolicUtils/jf8aQ/src/code.jl:498
...
Stacktrace:
[1] create_array(::Type{Base.ReshapedArray{…}}, ::Nothing, ::Val{2}, ::Val{(2, 1)}, ::Symbolics.Num, ::Vararg{Symbolics.Num})
@ GeometricMachineLearning ~/Documents/GeometricMachineLearning/src/pullbacks/zygote_pullback.jl:43
[2] macro expansion
@ ./none:8 [inlined]
[3] macro expansion
@ ~/.julia/packages/RuntimeGeneratedFunctions/M9ZX8/src/RuntimeGeneratedFunctions.jl:163 [inlined]
[4] macro expansion
@ ./none:0 [inlined]
[5] generated_callfunc
@ ./none:0 [inlined]
[6] (::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{…})(::Base.ReshapedArray{…}, ::NeuralNetworkParameters{…}, ::Int64)
@ RuntimeGeneratedFunctions ~/.julia/packages/RuntimeGeneratedFunctions/M9ZX8/src/RuntimeGeneratedFunctions.jl:150
[7] (::SymbolicNeuralNetworks.var"#15#17"{Base.ReshapedArray{…}, NeuralNetworkParameters{…}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{…}})(k::Int64) Maybe |
Short update: function create_array(::Type{<:Base.ReshapedArray{T, N, P}}, S, nd::Val, d::Val, elems...) where {T, N, P}
create_array(P, S, nd, d, elems...)
end would indeed fix the problem. My code wasn't running before due to another problem. |
This was referenced Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: