# Ary6\[1..2,0..-1\]

**URL:** <https://www.ruby-forum.com/t/ary6-1-2-0-1/194381>\
**Category:** Ruby\
**Created:** [September 3, 2010, 1:41pm UTC](https://www.ruby-forum.com/t/ary6-1-2-0-1/194381 "2010-09-03T13:41:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 3, 2010, 1:41pm UTC](https://www.ruby-forum.com/t/ary6-1-2-0-1/194381/1 "2010-09-03T13:41:11Z")

</div>

At the following:  
[http://ruby.gfd-dennou.org/tutorial/gokuraku/index-e.html](http://ruby.gfd-dennou.org/tutorial/gokuraku/index-e.html)

Under “Index”, I want to ask about the following:

ary6 = NArray.sfloat(4,3).indgen!(1.02.0) # This line didn’t work

ary6[1…2,0…-1] # What is meant by this line? didn’t understand how  
the output was formed

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 3, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/ary6-1-2-0-1/194381/2 "2010-09-03T16:57:26Z")

</div>

Hi,

On 03.09.2010 13:41, Abder-Rahman A. wrote:

> At the following:  
> [Dennou-Ruby Tutorial](http://ruby.gfd-dennou.org/tutorial/gokuraku/index-e.html)
> 
> Under “Index”, I want to ask about the following:
> 
> ary6 = NArray.sfloat(4,3).indgen!(1.02.0) # This line didn’t work
> 
> ary6[1…2,0…-1] # What is meant by this line? didn’t understand how  
> the output was formed

This is just another form of array slicing, see  
[class Array - RDoc Documentation](http://ruby-doc.org/core/classes/Array.html#M002160) for the details.

HTH

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 3, 2010, 5:42pm UTC](https://www.ruby-forum.com/t/ary6-1-2-0-1/194381/3 "2010-09-03T17:42:38Z")

</div>

Can you clatfiy my question based on this? Still cannot get the idea.
