f=: ($ -. 1:) ($,) ] $ f 3 1 4 1 5 9 $ 'abc' 3 4 5 9
On Tue, Mar 4, 2014 at 1:38 PM, Brian Schott <[email protected]> wrote: > Is there a general verb that can reshape any noun with 1s in its shape so > that the axes with 1s disappear? I know that most often changing > calculations slightly can eliminate the 1s before they arise, but not > always. > > For example if $a == 4 1 4 3, is there a verb that will > make generalize the result like how ,"_2]1|: does in this case? > $,"_2]1|:a == 4 4 3 > > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
