factor/extra/tensors/tensor-slice/tensor-slice-tests.factor

12 lines
662 B
Factor
Raw Normal View History

tensors: create basic tensors vocabulary. tensors: create tensors vocabulary. tensors: create file heading tensors: define tensor constructor. tensors: add additional constructors. tensors: add reshaping. tensors: implement add and include tests. tensors: add binary operations. tensors: add scalar multiply. tensors: added >array functionality tensors: tests for >array tensors: unit tests fix tensors: use more idiomatic >array. tensors: add multi-methods for scalar multiplication. tensors: cleaned up >array tensors: combine a few constructors tensors: added dims function and unit tests. tensors: add documentation capabilities. tensors: added multi-methods for scalar addition/subtraction/division help.lint.coverage: fix for shadowing "empty" word; prevent the other test-only words from being shadowed too soundex: move to extra as it's unused; fix authors.txt filename modify arange to match numpy; replace with naturals create >float-array for efficient float array construction use combinators tensors: documentation added for public functions. tensors: implement t% and matrix multiplication. tensors: add slice with non-zero step tensors: add documentation. tensors: added transposition funcitonality, with documentation and tests tensors: add error documentation. Add error documentation tensors: fix matmul documentation. extra/tensors: add tests for arange tensors: make transpose style more similar tensors: make some of the PR changes. tensors: separate shape checking. tensors: add documentation for non-positive-shape-error. tensors: add missing comment. tensors: transpose edits for efficiency
2019-10-29 13:09:38 -04:00
USING: arrays sequences tensors.tensor-slice tools.test ;
IN: tensors.tensor-slice.tests
{ { 9 7 5 } } [ -1 -6 -2 10 <iota> <step-slice> >array ] unit-test
{ { 9 7 } } [ -1 -5 -2 10 <iota> <step-slice> >array ] unit-test
{ { 9 7 } } [ -1 -4 -2 10 <iota> <step-slice> >array ] unit-test
{ { 9 } } [ -1 -3 -2 10 <iota> <step-slice> >array ] unit-test
{ { } } [ -4 10 -2 10 <iota> <step-slice> >array ] unit-test
{ { 6 8 } } [ -4 15 2 10 <iota> <step-slice> >array ] unit-test
{ { 1 3 } } [ 1 4 2 10 <iota> <step-slice> >array ] unit-test
{ { 1 3 } } [ 1 5 2 10 <iota> <step-slice> >array ] unit-test
{ { 1 3 5 } } [ 1 6 2 10 <iota> <step-slice> >array ] unit-test