extra: using "swap index".

db4
John Benediktsson 2014-11-29 11:25:42 -08:00
parent 3d86fba48b
commit 761be328a6
2 changed files with 2 additions and 4 deletions

View File

@ -58,7 +58,7 @@ ERROR: undefined-find-nth m n seq quot ;
>lower '[ name>> _ = ] find ; inline
: stack-find ( seq quot: ( elt -- 1/0/-1 ) -- i/f )
map cum-sum [ 0 = ] find drop ; inline
map cum-sum 0 swap index ; inline
: tag-classifier ( string -- quot )
>lower

View File

@ -18,6 +18,4 @@ M: label-binarizer transform-y
] map ;
M: label-binarizer inverse-transform-y
classes_>> '[
[ 1 = ] find drop _ nth
] map ;
classes_>> '[ 1 swap index _ nth ] map ;