Size check error would typically be a DimensionMismatch.

--Tim

On Thursday, April 21, 2016 10:11:49 PM Robert DJ wrote:
> I've become fond of using the @assert macro for checking input to
> functions, e.g.
> 
> @assert size(A) == size(B)
> @assert x > 0
> 
> Now I've read discussions like
> https://github.com/JuliaLang/julia/issues/10614 where I see that this not
> recommended and that @assert is slow.
> What is then the "right" Julian way that isn't slowing things down?
> Something like
> 
> size(A) != size(B) && throw(ArgumentError())
> x <= 0 && throw(DomainError())

Reply via email to