Skip to main content
edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
edited tags
Link
Yves Klett
  • 15.5k
  • 5
  • 58
  • 125
Source Link
matheorem
  • 17.4k
  • 8
  • 49
  • 118

Is there a bug in the Part function of Mathematica 10?

I am using Mathematica 10 now.

I typed code below

{{1, 2}, {2, 4}, {3, 6}, {4, 8}}[[;; , 1]][[1]]

and this gives result

1

But code

{{1, 2}, {2, 4}, {3, 6}, {4, 8}}[[;; , 1, 1]]

gives error

Part::partd: Part specification {{1,2},{2,4},{3,6},{4,8}}[[1;;All,1,1]] is longer than depth of object. >>

But according to help doc

expr[[i,j,...]]] or Part[expr,i,j,...]] is equivalent to expr[[i]][[j]]...

What is wrong?!! I remember I always coded it like this in Mathematica 9, no error occurs. Is it a bug??