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

    The shape attribute for numpy arrays returns the dimensions of the array. If Y has n rows and m columns, then Y.shape is (n,m). So Y.shape[0] is n.

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

  4. python - shape vs len for numpy array - Stack Overflow

    May 24, 2016 · Still, performance-wise, the difference should be negligible except for a giant giant 2D dataframe. So in line with the previous answers, df.shape is good if you need both …

  5. Padding doesn't affect <shape> in an XML Layout - Stack Overflow

    Aug 16, 2009 · 122 I am trying to set padding in a <shape> declared within an XML file/layout. But whatever I set, nothing changes related to padding. If I modify any other properties, I see the …

  6. Custom shape in android using xml - Stack Overflow

    Oct 18, 2016 · I am trying to draw a custom shape which I can use as a background for my layout. But I am not able to do so. Is it possible to draw a shape as below using xml in android. I am …

  7. python - Numpy error: shape mismatch - Stack Overflow

    May 16, 2014 · When I was trying to solve a scientific problem with Python (Numpy), a 'shape mismatch' error came up: "shape mismatch: objects cannot be broadcast to a single shape".

  8. python - ValueError: shape mismatch: value array of shape could …

    Jun 24, 2021 · ValueError: shape mismatch: value array of shape could not be broadcast to indexing result of shape Asked 4 years, 4 months ago Modified 4 years, 4 months ago Viewed …

  9. python - Explaining the differences between dim, shape, rank, …

    Mar 1, 2014 · I'm new to python and numpy in general. I read several tutorials and still so confused between the differences in dim, ranks, shape, aixes and dimensions. My mind …

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