Actually given ] a=: 8!:0 ,: >: i.5 +-+-+-+-+-+ |1|2|3|4|5| +-+-+-+-+-+ $a 1 5 datatype &.> a +-------+-------+-------+-------+-------+ |literal|literal|literal|literal|literal| +-------+-------+-------+-------+-------+
the & is not required and I'd be inclined to use the dyadic form of ". (Numbers) rather than the monadic form (Do) when converting a character string to numbers. _999 ". > a 1 2 3 4 5 ". > a 1 2 3 4 5 tst=: 8!:0 i. 1000 1000 ts=: 6!:2 , 7!:2...@] ts '".&> tst' 1.60329 7.75337e7 ts '_999".> tst' 0.522114 3.04096e7 The difference is even bigger for floating point numbers. ---Brian Schott wrote: > I think using just ".&> would work better for you than using cut, > because cut reverses the order of each row. Also, notice that ravel is > just as good as raze. > > a NB. this is your a > +-+-+-+-+-+ > |1|2|3|4|5| > +-+-+-+-+-+ > ".&> a > 1 2 3 4 5 > $".&> a > 1 5 > ,".&> a > 1 2 3 4 5 > $,".&> a > 5 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
