Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14989

Position[] bug or feature ?

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Position[] bug or feature ?
Date 2013-06-24 02:50 +0000
Message-ID <kq8c5l$6o9$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Dear Group

When trying to evaluate the following code the expected result is returned.
But strangly there is an error message generated.
The code should (and does) return the positions of all sublists with an even element at the second position.



Position[{{1, 2}, {2, 3}, {1, 4}}, _?(EvenQ[#[[2]]] &), {1}]

Part::partd: Part specification List[[2]] is longer than depth of object. >>

{{1}, {3}}



Any hints if this a bug or a feature ?

Regards Robert

Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar


Thread

Position[] bug or feature ? roby <roby.nowak@gmail.com> - 2013-06-24 02:50 +0000
  Re: Position[] bug or feature ? roby <roby.nowak@gmail.com> - 2013-06-25 06:53 +0000
  Re: Position[] bug or feature ? stephen.p.luttrell@gmail.com - 2013-06-25 06:51 +0000

csiph-web