Consider

julia> eltype(Array(Int,1))<:Integer
true

julia> isa(5, Number)
true

julia> isa(Int, Number)
false

julia> isa(Int, DataType)
true

isa tests whether something is an instance of a type.  As Int is not an
instance of Integer but a subtype isa(Int,Integer)==false.

On Fri, 2015-03-06 at 07:09, Júlio Hoffimann <[email protected]> wrote:
> Hi,
>
> Someone could please explain the difference?
>
> julia> iseltype(Array(Int,1), Integer)
> true
>
> julia> isa(eltype(Array(Int,1)),Integer)
> false
>
> Thanks,
> Júlio.

Reply via email to