Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Numpy Quick start Tutorial
#1
Please look at text below which is from the NumPy tutorial. Shouldn't it say that the 1st axes have a length of 3 since it has 3 elements instead of 2? if not please explain.




In the example pictured below, the array has 2 axes. The first axis has a length of 2, the second axis has a length of 3.

[[ 1., 0., 0.],
[ 0., 1., 2.]]
Quote
#2
First axe has a length of 2, i.e. there are 2 elements - that is there are 2 elements in the outer list
Second axe has a length of 3 - that is each of the inner lists has 3 elements

If you prefer - there are 2 rows and 3 columns (you can see that from the way you presented the array)
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Error installing numpy srm 3 180 Jul-08-2019, 06:26 PM
Last Post: srm
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 906 May-29-2019, 02:48 AM
Last Post: heiner55
  Array in numpy Truman 5 3,249 May-26-2019, 10:14 AM
Last Post: snippsat
  [split] Array in numpy aapurdel 1 155 May-25-2019, 08:05 PM
Last Post: buran
  [numpy]add a value to an array elmismo999 1 193 May-23-2019, 04:15 PM
Last Post: michalmonday
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 241 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 244 Apr-06-2019, 11:52 AM
Last Post: scidam
  counting the occurence of a specified number in a numpy-matrix PhysChem 1 220 Apr-03-2019, 01:37 PM
Last Post: PhysChem
  How to get the size of a numpy array? mcgrim 2 296 Mar-23-2019, 02:25 PM
Last Post: perfringo
  creating an empty NumPy array in Python sandeepatel 2 539 Jan-16-2019, 09:24 AM
Last Post: rinu

Forum Jump:


Users browsing this thread: 1 Guest(s)