Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | quanta |
v | in | a record array from which to extract elements | |
Allowed: | record (array) | ||
... | in | slicing dimensions | |
Allowed: | integers, an index record, integer vectors |
- print a := r_array(1:5, 2, 3) # create array [*31=1, *32=2, *33=3, *34=4, *35=5, *36=1] - a:: # its shape [shape=[2 3] ] - r_slice(a,5) # one element index 5 - r_slice(a,5):: # gives a scalar [=] - r_slice(a,1,) # a slice [*39=1, *40=3, *41=5] - r_slice(a,1,):: # gives a vector [shape=3] - r_slice(a,1,2:3) # and another [*49=3, *50=5] - r_slice(a,1,2:3):: [shape=2] [*17=1, *18=2] - r_slice(a,1:2,):: # an array slice [shape=[2 3] ]