Re: Re: Re: problem with Pick

• To: mathgroup at smc.vnet.net
• Subject: [mg78354] Re: [mg78319] Re: [mg78209] Re: [mg78194] problem with Pick
• From: János <janos.lobb at yale.edu>
• Date: Fri, 29 Jun 2007 05:40:02 -0400 (EDT)
• References: <acbec1a40706230431p4f1db9a9i4320680dda027396@mail.gmail.com> <200706251106.HAA05048@smc.vnet.net> <6321860.1182850677359.JavaMail.root@m35> <200706280826.EAA20408@smc.vnet.net>

```Like barbers who are shaving themselves...  :)

J=E1nos
P.S.  I am hearing someone turning slowly in his grave....

On Jun 28, 2007, at 4:26 AM, DrMajorBob wrote:

> That's entirely contrary to the documentation, which says that Pick
> "picks
> out those ELEMENTS of list for which the corresponding ELEMENT of
> sel is
> True."
>
> How is a list its own ELEMENT, if English words mean anything?
>
> Bobby
>
> On Tue, 26 Jun 2007 03:08:14 -0500, Oyvind Tafjord
> <tafjord at wolfram.com>
> wrote:
>
>> Chris Chiasson wrote:
>>> Step to reproduce:
>>> 1. Evaluate these two inputs with a fresh kernel:
>>> Pick[{a,b},z[{},{1}],{__}]
>>> Pick[{a,b},{{},{1}},{__}]
>>>
>>> Expected results:
>>> {b}
>>> {b}
>>>
>>> Actual results:
>>> {b}
>>> {a,b}
>>>
>>> Relevant Documentation:
>>> Pick[list,sel,patt] picks out those list[[i1,i2,...]] for which
>>> sel[[i1,i2,...]] matches patt.
>>
>> In this case, sel={{},{1}}. sel[[]] matches patt, and so list[[]] is
>> picked out.
>>
>> This behavior, in which all of list gets picked, does produce a fair
>> amount
>> of confusion, unfortunately. It often shows up in connection with
>> Except:
>>
>> In[1]:= Pick[{a, b, c}, {1, 2, 3}, Except[2]]
>> Out[1]= {a, b, c}
>>
>> In[2]:= Pick[{a, b, c}, {1, 2, 3}, Except[2, _Integer]]
>> Out[2]= {a, c}
>>
>> Oyvind Tafjord
>> Wolfram Research
>>
>>>
>>> Relevant Evaluation:
>>> In[3]:= MatchQ[{},{__}]
>>> Out[3]= False
>>>
>>> In[4]:= {Internal`\$CreationID,\$Version}
>>> Out[4]= {853857,6.0 for Microsoft Windows (32-bit) (April 27,
>>> 2007) }
>>>
>>> --
>>> http://chris.chiasson.name/
>>
>>
>>
>
>
>
> --
> DrMajorBob at bigfoot.com

```

• Prev by Date: Re: How to save/export a Manipulate[...] run to a movie file?
• Next by Date: Re: Re: Re: extracting fractional powers of series expansion?
• Previous by thread: Re: Re: problem with Pick
• Next by thread: Re: Re: problem with Pick