MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How can this MapAt application be done more efficiently


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] ====


  • Prev by Date: Re: How can this MapAt application be done more efficiently
  • Next by Date: Re: Re: The Mathematica Journal-Supplements
  • Previous by thread: Re: How can this MapAt application be done more efficiently
  • Next by thread: Re: How can this MapAt application be done more efficiently