Bug introduced in 10.3 and fixed in 10.4
--
Just checking whether anyone else can replicate this, or if it's a problem on my computer. The following refuses to execute on my machine, 10.3.1:
Take[{{1}}, All, {UpTo@3}]
It results in General::nomem and Throw::sysexc.
The behaviour seems to be for UpTo[anything bigger than 3], but not for 2.
The intended behaviour would be for it to output {{}}, analogously with
Take[{{1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1}, {1, 2, 3}}, All, {UpTo@2}]
which outputs {{2}, {2}, {}, {2}}.
UpTo[3]does not have such a form. What are you trying to accomplish? This works:Take[{{1, 2, 3, 4, 5}}, All, {UpTo[3]}]. – David G. Stork Jan 02 '16 at 00:18Take[{{1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1}, {1, 2, 3}}, All, {UpTo@2}]outputs{{2}, {2}, {}, {2}}, for instance. I could just useTake[{{1}}, All, UpTo@3]and trim down the lists as necessary, but this way was working for when I constructed my prototype using data that let me have 2 instead of 3. – Patrick Stevens Jan 02 '16 at 00:20Take[{1,2,3}, {n}]returning thenth element ofTake[{1,2,3}, n]; henceTake[{1,2,3}, {UpTo@n}]should return thenth element ofTake[{1,2,3}, UpTo@n], or something standard if the list isn't long enough. Experimenting, when n=2 the "something standard" turns out to be{}. – Patrick Stevens Jan 02 '16 at 00:32{UpTo[n]}effectively means{UpTo[n], UpTo[n]}and in a sequence specification{m1, m2}only the second position allowsUpTo. It would be confusing in the first position. – ilian Jan 02 '16 at 00:47FindRootunderParallelTable. When will the development version that you mentioned above be released? Thanks. – bbgodfrey Feb 12 '16 at 06:04UpTo). Please consider sending the example to support@wolfram.com. – ilian Feb 12 '16 at 16:53