Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: problem with Pick

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78213] Re: problem with Pick
  • From: "Michael Weyrauch" <michael.weyrauch at gmx.de>
  • Date: Tue, 26 Jun 2007 04:10:18 -0400 (EDT)
  • References: <acbec1a40706230431p4f1db9a9i4320680dda027396@mail.gmail.com> <f5o7og$50i$1@smc.vnet.net>

Hello,

  this may explain the different results:

In[9]:= MatchQ[{{}, {1}}, {__}]
Out[9]= True
In[10]:= MatchQ[z[{}, {1}], {__}]
Out[10]= False

Note, that not even list in Pick[list,sel, patt] must have Head List.

Regards   Michael




"Chris Chiasson" <chris at chiasson.name> schrieb im Newsbeitrag news:f5o7og$50i$1 at smc.vnet.net...
> 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.
> 
> 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/
>


  • Prev by Date: Re: save as pdf in version 6
  • Next by Date: Re: Mac OS X 10.4.10 update and 64 bit
  • Previous by thread: Re: Re: problem with Pick
  • Next by thread: Re: problem with Pick