Yes, that's the solution that Patrick O'Leary propose a couple of messages
above.
terça-feira, 17 de Fevereiro de 2015 às 21:06:12 UTC, Uwe Fechner escreveu:
>
> eltype([1f0]) == Float32 is working, too.
>
> On Tuesday, February 17, 2015 at 8:39:05 PM UTC+1, Simon Danisch wrote:
>>
>> *eltype([1f0]) <: Float32* should do the trick...
>>
>> Am Dienstag, 17. Februar 2015 17:03:12 UTC+1 schrieb J Luis:
>>>
>>> julia> isa(1.0f0, Float32)
>>> true
>>>
>>> julia> isa([1.0f0], Float32)
>>> false
>>>
>>> julia> isa([1.0f0], Array{Float32})
>>> true
>>>
>>> It means that to know the data type one must first test if the variable
>>> is scalar or array. Not nice. I find the Matlab equivalent much easier to
>>> use.
>>>
>>