You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I caught this when doing CI. I reproduced it on my machine. Here's the output using a fresh install of Julia.
julia>versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2 (2024-10-0711:40 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU:16× AMD Ryzen 71700 Eight-Core Processor
WORD_SIZE:64
LLVM: libLLVM-16.0.6 (ORCJIT, znver1)
Threads:1 default, 0 interactive, 1 GC (on 16 virtual cores)
(@v1.11) pkg> update
Installing known registries into `C:\Users\usr\.julia`
Added `General` registry to C:\Users\usr\.julia\registries
Updating registry at `C:\Users\usr\.julia\registries\General.toml`
No Changes to `C:\Users\usr\.julia\environments\v1.11\Project.toml`
No Changes to `C:\Users\usr\.julia\environments\v1.11\Manifest.toml`
Info We haven't cleaned this depot up for a bit, running Pkg.gc()...
Active manifest files:1 found
Active artifact files:0 found
Active scratchspaces:0 found
Deleted no artifacts, repos, packages or scratchspaces
Add JuMP and nothing else.
julia>]add JuMP
julia>using JuMP
julia> model = JuMP.Model()
A JuMP Model
├ solver: none
├ objective_sense: FEASIBILITY_SENSE
├ num_variables:0
├ num_constraints:0
└ Names registered in the model: none
julia>@variable(model, x[1:3,1:5])
3×5 Matrix{VariableRef}:
x[1,1] x[1,2] x[1,3] x[1,4] x[1,5]
x[2,1] x[2,2] x[2,3] x[2,4] x[2,5]
x[3,1] x[3,2] x[3,3] x[3,4] x[3,5]
julia>sum(x, dims=2)
ERROR: MethodError: no method matching operate(::typeof(sum), ::Matrix{VariableRef}; dims::Int64)
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
Closest candidates are:operate(::typeof(sum), ::AbstractArray; init) got unsupported keyword argument "dims"
@ MutableArithmetics C:\Users\usr\.julia\packages\MutableArithmetics\6jxVC\src\reduce.jl:53operate(::typeof(LinearAlgebra.dot), ::AbstractArray, ::AbstractArray) got unsupported keyword argument "dims"
@ MutableArithmetics C:\Users\usr\.julia\packages\MutableArithmetics\6jxVC\src\implementations\LinearAlgebra.jl:521operate(::typeof(*), ::AbstractMatrix{S}, ::AbstractMatrix{T}) where {T, S} got unsupported keyword argument "dims"
@ MutableArithmetics C:\Users\usr\.julia\packages\MutableArithmetics\6jxVC\src\implementations\LinearAlgebra.jl:426...
Stacktrace:
[1] kwerr(::@NamedTuple{dims::Int64}, ::Function, ::Function, ::Matrix{VariableRef})
@ Base .\error.jl:165
[2] sum(a::Matrix{VariableRef}; kwargs::@Kwargs{dims::Int64})
@ MutableArithmetics C:\Users\usr\.julia\packages\MutableArithmetics\6jxVC\src\dispatch.jl:17
[3] top-level scope
@ REPL[5]:1
julia>sum(x)
x[1,1] + x[2,1] + x[3,1] + x[1,2] + x[2,2] + x[3,2] + x[1,3] + x[2,3] + x[3,3] + x[1,4] + x[2,4] + x[3,4] + x[1,5] + x[2,5] + x[3,5]
When I check the methods table for sum, I get the following output.
It seems the error is in MutableArithmetics.jl. It's weird because it wasn't failing a few days ago, and it fails on CI as well as my pc.
Any insight?
The text was updated successfully, but these errors were encountered:
dcelisgarza
changed the title
Error with sum along a dimension. May be an error in a dependency.
Error with sum along a dimension. May be an error in MutableArithmetics.jl.
Oct 15, 2024
I caught this when doing CI. I reproduced it on my machine. Here's the output using a fresh install of Julia.
Add JuMP and nothing else.
When I check the methods table for sum, I get the following output.
When I use the
@which
macro I get this.It seems the error is in
MutableArithmetics.jl
. It's weird because it wasn't failing a few days ago, and it fails on CI as well as my pc.Any insight?
The text was updated successfully, but these errors were encountered: