Skip to content

Commit 68bf683

Browse files
committed
fix: added messages for assertions
1 parent 129e311 commit 68bf683

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/batchs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ struct ConcatenatedBatch{T<:AbstractArray}
1212
field::T
1313
lengths::Vector{Int}
1414
function ConcatenatedBatch(field::T, lengths::Vector{Int}) where {T<:AbstractArray}
15-
@assert first(lengths) == 0
16-
@assert issorted(lengths)
17-
@assert last(lengths) == size(field)[end]
15+
@assert first(lengths) == 0, "got $lengths"
16+
@assert issorted(lengths), "got $lengths"
17+
@assert last(lengths) == size(field)[end], "got $lengths, last value is $( size(field)[end])"
1818
new{T}(field, lengths)
1919
end
2020
end

0 commit comments

Comments
 (0)