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

    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 dimension of …

  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 - x.shape [0] vs x [0].shape in NumPy - Stack Overflow

    Jan 7, 2018 · 2 x[0].shape gives you the length of the first row. x.shape[0] gives you the first component of the dimensions of 'x', 1024 rows by 10 columns.

  5. I want to know what it means (height,width)=img.shape [:2]

    Feb 1, 2021 · It depends on what type the 'img' object is. What are you using? I'm assuming opencv ? Then the shape of the object holds a tuple (rows, columns, channels). …

  6. 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, 3 months ago Viewed 60k times

  7. 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?

  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. vba - Get shape by Id or Name - Stack Overflow

    Mar 26, 2014 · Is there any way to get a shape if you know its Id? For example: Dim myshape As Shape myshape.Id = 42 myshape = getShapeById(myshape.Id) Or, alternatively, could I get …

  10. ValueError: shape mismatch: objects cannot be broadcast to a …

    ValueError: shape mismatch: objects cannot be broadcast to a single shape It computes the first two (I am running several thousand of these tests in a loop) and then dies.

Refresh