1 ! Copyright (C) 2012 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays.shaped kernel tools.test math ;
4 IN: arrays.shaped.tests
24 } >shaped-array shape>>
37 { sa{ 1 } } [ { } ones ] unit-test
38 { sa{ 1 } } [ { 1 } ones ] unit-test
40 { sa{ 0 } } [ { } zeros ] unit-test
41 { sa{ 0 } } [ { 1 } zeros ] unit-test
43 ! Error on 0, negative shapes
46 sa{ { 1 3 3 } { 4 1 3 } { 4 4 1 } }
48 { 3 3 } 2 strict-lower
49 [ drop 3 ] map-strict-upper
50 [ drop 1 ] map-diagonal
51 [ sq ] map-strict-lower