szcf-weiya / DegreesOfFreedom.jl

Julia package for "Degrees of Freedom: Search Cost and Self-consistency"
https://hohoweiya.xyz/DegreesOfFreedom.jl/
MIT License
2 stars 0 forks source link

ArgumentError: no outer repetition count may be negative; got (-1,) #3

Closed szcf-weiya closed 1 year ago

szcf-weiya commented 1 year ago
julia> repeat([""], -1)
ERROR: ArgumentError: no outer repetition count may be negative; got (-1,)
Stacktrace:
 [1] check
   @ ./abstractarraymath.jl:450 [inlined]
 [2] #repeat#1
   @ ./abstractarraymath.jl:399 [inlined]
 [3] repeat(A::Vector{String}, counts::Int64)
   @ Base ./abstractarraymath.jl:356
 [4] top-level scope
   @ REPL[8]:1
 [5] top-level scope
   @ ~/Programs/.julia/packages/CUDA/DfvRa/src/initialization.jl:52

julia> repeat([""], -2)
ERROR: ArgumentError: no outer repetition count may be negative; got (-2,)
Stacktrace:
 [1] check
   @ ./abstractarraymath.jl:450 [inlined]
 [2] #repeat#1
   @ ./abstractarraymath.jl:399 [inlined]
 [3] repeat(A::Vector{String}, counts::Int64)
   @ Base ./abstractarraymath.jl:356
 [4] top-level scope
   @ REPL[9]:1
 [5] top-level scope
   @ ~/Programs/.julia/packages/CUDA/DfvRa/src/initialization.jl:52