Hi Paul,

To expand a little on what DNF and Ismael are saying is that 1:10, for most 
purposes, is already an array you can work with:

julia> a = 1:10
1:10

julia> b = 3*a
3:3:30

julia> a[2]
2

In other words, for cases where you think you might want to use 
"collect(a)", you can probably just use "a" directly.

On Friday, November 6, 2015 at 9:59:27 PM UTC+8, Ismael VC wrote:
>
> What DNF means is that must of the time you don't need to convert a range 
> into an array, since the range is tolerable. The only times I need to do 
> that is if I need to slice or index the elements of the range. 
>
> So what are you doing with this range?
> El 06/11/2015 07:54, "Paul Analyst" <paul.a...@mail.com <javascript:>> 
> escribió:
>
>> Not work               _
>>    _       _ _(_)_     |  A fresh approach to technical computing
>>   (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
>>    _ _   _| |_  __ _   |  Type "?help" for help.
>>   | | | | | | |/ _` |  |
>>   | | |_| | | | (_| |  |  Version 0.4.0 (2015-10-08 06:20 UTC)
>>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
>> |__/                   |  x86_64-w64-mingw32
>>
>> julia> a=1:10
>> 1:10
>>
>> julia>
>>
>> W dniu 2015-11-05 o 18:40, DNF pisze:
>>
>>> Did you try my suggestion? Just use
>>> a = 1:10
>>>
>>> Doesn't it work the way you want?
>>>
>>
>>

Reply via email to