Yorick (programming Language) - Features

Features

  • Indexing

Yorick is good at manipulating elements in N-dimensional arrays conveniently with its powerful syntax.

Range of indices

Several elements can be accessed all at once:

> x=; > x > x(3:6) > x(3:6:2) > x(6:3:-2)
Arbitrary elements
> x=,] > x ,] > x(,) ,] > list=where(1 list > y=x(list) > y
Pseudo-index

Like "theading" in PDL (Perl Data Language) and "broadcasting" in Numpy (Numeric extension for Python), Yorick has a mechanism to do this:

> x= > x > y=,] > y ,] > y(-,) ,,],,,]] > x(-,) ,,] > x(,-) ] > x(,-)/y ,] > y=,] > x(,-)/y ,]
Rubber index

".." is a rubber-index to represent zero or more dimensions of the array.

> x=,] > x ,] > x(..,1) > x(1,..) > x(2,..,2) 5

"*" is a kind of rubber-index to reshape a slice(sub-array) of array to a vector.

> x(*)
Tensor multiplication

Tensor multiplication is done as follows in Yorick:

P(,+,,)*Q(,,+)

means

> x=,] > x ,] > y=,,] > x(,+)*y(+,) ,,] > x(+,)*y(,+) ,]

Read more about this topic:  Yorick (programming Language)

Famous quotes containing the word features:

    However much we may differ in the choice of the measures which should guide the administration of the government, there can be but little doubt in the minds of those who are really friendly to the republican features of our system that one of its most important securities consists in the separation of the legislative and executive powers at the same time that each is acknowledged to be supreme, in the will of the people constitutionally expressed.
    Andrew Jackson (1767–1845)

    All visible objects, man, are but as pasteboard masks. But in each event—in the living act, the undoubted deed—there, some unknown but still reasoning thing puts forth the mouldings of its features from behind the unreasoning mask. If man will strike, strike through the mask!
    Herman Melville (1819–1891)

    Art is the child of Nature; yes,
    Her darling child, in whom we trace
    The features of the mother’s face,
    Her aspect and her attitude.
    Henry Wadsworth Longfellow (1807–1882)