About 1,780,000 results
Open links in new tab
  1. What does .shape [] do in "for i in range (Y.shape [0])"?

    Aug 8, 2014 · shape is a tuple that gives you an indication of the number of dimensions in the array. So in your case, since the index value of Y.shape[0] is 0, your are working along the first …

  2. Difference between numpy.array shape (R, 1) and (R,)

    Shape n, expresses the shape of a 1D array with n items, and n, 1 the shape of a n-row x 1-column array. (R,) and (R,1) just add (useless) parentheses but still express respectively 1D …

  3. arrays - what does numpy ndarray shape do? - Stack Overflow

    Nov 30, 2017 · 82 yourarray.shape or np.shape() or np.ma.shape() returns the shape of your ndarray as a tuple; And you can get the (number of) dimensions of your array using …

  4. python - What does -1 mean in numpy reshape? - Stack Overflow

    Sep 9, 2013 · This answer contains a lot of examples but doesn't lay out what -1 does in plain English. When reshaping an array, the new shape must contain the same number of elements …

  5. What does shape[0] and shape[1] do in python? - Stack Overflow

    Jul 21, 2018 · In python shape [0] returns the dimension but in this code it is returning total number of set. Please can someone tell me work of shape [0] and shape [1]? Code: m_train = …

  6. python - x.shape [0] vs x [0].shape in NumPy - Stack Overflow

    Jan 7, 2018 · 10 x[0].shape will give the Length of 1st row of an array. x.shape[0] will give the number of rows in an array. In your case it will give output 10. If you will type x.shape[1], it will …

  7. How to customize marker colors and shapes in scatter plot?

    Dec 7, 2017 · I have a data set with 9 columns. 7 features are used for feature selection and one of them for the classification. I used tsne library for feature selection in order to see how much …

  8. python - 'list' object has no attribute 'shape' - Stack Overflow

    Jan 9, 2014 · list object in python does not have 'shape' attribute because 'shape' implies that all the columns (or rows) have equal length along certain dimension. Let's say list variable a has …

  9. PyTorch: How to get the shape of a Tensor as a list of int

    Oct 19, 2017 · Instead of calling list, does the Size class have some sort of attribute I can access directly to get the shape in a tuple or list form?

  10. Pandas Dataframe ValueError: Shape of passed values is (X, ), …

    Pandas Dataframe ValueError: Shape of passed values is (X, ), indices imply (X, Y) Asked 11 years, 8 months ago Modified 7 years, 4 months ago Viewed 60k times