Open jmichel7 opened 1 year ago
playing around with Factorizations I noticed a bug
Factorizations
julia> print(factor(24)) Primes.Factorization(2 => 3, 3 => 1) julia> Primes.Factorization(2 => 3, 3 => 1) ERROR: MethodError: no method matching Primes.Factorization(::Pair{Int64, Int64}, ::Pair{Int64, Int64}) Stacktrace: [1] top-level scope @ REPL[3]:1
you should either print factor(24) as Primes.Factorization(Dict(2 => 3, 3 => 1)) or add a method
factor(24)
Primes.Factorization(Dict(2 => 3, 3 => 1))
Primes.Factorization(l::Pair{T,Int}...) where T=Primes.Factorization(Dict(l))
so that one can round-trip a Factorization
Factorization
playing around with
Factorizations
I noticed a bugyou should either print
factor(24)
asPrimes.Factorization(Dict(2 => 3, 3 => 1))
or add a methodPrimes.Factorization(l::Pair{T,Int}...) where T=Primes.Factorization(Dict(l))
so that one can round-trip a
Factorization