Noe now supports multidimensional indexing

Sunday, January 12, 2020

Some progress I got there. Noe now supports mutidimensional indexing. See following examples:

A := FullTensor([3, 2, 3]);
WriteLn('A:');
PrintTensor(A);

WriteLn(sLineBreak + 'A at index [2]:');
PrintTensor(A.GetAt([2]));

WriteLn(sLineBreak + 'A at index [0, 1]:');
PrintTensor(A.GetAt([0, 1]));

WriteLn(sLineBreak + 'A at index [1, 1, 0]:');
PrintTensor(A.GetAt([1, 1, 0]));            

Compiled properly, it will output:

A:
[[[0.97, 0.47, 0.57]
  [0.08, 0.51, 0.13]]

 [[0.43, 0.67, 0.55]
  [0.93, 0.86, 0.84]]

 [[0.00, 0.32, 0.03]
  [0.57, 0.95, 0.32]]]

A at index [2]:
[[0.00, 0.32, 0.03]
 [0.57, 0.95, 0.32]]

A at index [0, 1]:
[0.08, 0.51, 0.13]

A at index [1, 1, 0]:
0.93

Will probably write a long post about it later, as well as how I implement the ndarray itself. Please have a try.

#development

Autograd (and some fun stuffs) came to noe

I am implementing ndarray in pascal

comments powered by Disqus