About 9,840,000 results
Open links in new tab
  1. 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 …

  2. 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 …

  3. 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 …

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

    Jan 7, 2018 · On the other hand, x.shape is a 2-tuple which represents the shape of x, which in this case is (10, 1024). x.shape[0] gives the first element in that tuple, which is 10. Here's a …

  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. numpy: "size" vs. "shape" in function arguments? - Stack Overflow

    Oct 22, 2018 · Shape (in the numpy context) seems to me the better option for an argument name. The actual relation between the two is size = np.prod(shape) so the distinction should …

  7. shape = 19, shape = 20 and shape=16 in R graphics [duplicate]

    Jan 23, 2020 · In R graphics and ggplot2 we can specify the shape of the points. I am wondering what is the main difference between shape = 19, shape = 20 and shape = 16? Is it the size? …

  8. Visio Master Shape Unable to Edit Data Graphic - Stack Overflow

    Feb 28, 2025 · Background I want to create a reusable shape in Visio (Visio 365 Desktop) with certain data attached. I created a custom Stencil in "My Shapes", right clicked it and selected …

  9. Keras input explanation: input_shape, units, batch_size, dim, etc

    Jun 25, 2017 · For any Keras layer (Layer class), can someone explain how to understand the difference between input_shape, units, dim, etc.? For example the doc says units specify the …

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