Re: How can this MapAt application be done more efficiently
- To: mathgroup at smc.vnet.net
- Subject: [mg4208] Re: How can this MapAt application be done more efficiently
- From: rhall2 at umbc.edu (hall robert)
- Date: Thu, 13 Jun 1996 23:12:05 -0400
- Organization: University of Maryland, Baltimore County
- Sender: owner-wri-mathgroup at wolfram.com
In article <4pis80$iuo at dragonfly.wolfram.com>,
Joel Cannon <cannon at alpha.centenary.edu> wrote:
>I have written a function to Drop any zero's from a table of numbers.
>Here is an example:
>
> In[161]:= dropzero[ {{5, 0}, {4, 1}, {3, 2, 0}, {3, 1, 1}} ]
>
> Out[161]= {{5}, {4, 1}, {3, 2}, {3, 1, 1}}
>
>I would like to learn how to do it more efficiently. In what I am
You may have noticed this function in an unrelated posting today.
In[2]:=
DeleteCases[{{5, 0}, {4, 1}, {3, 2, 0}, {3, 1, 1}}, 0, {2}]
Out[2]=
{{5}, {4, 1}, {3, 2}, {3, 1, 1}}
--
Bob Hall | "Know thyself? Absurd direction!
rhall2 at gl.umbc.edu | Bubbles bear no introspection." -Khushhal Khan Khatak
==== [MESSAGE SEPARATOR] ====