About 10,900,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 your array.

  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 and 2D array …

  3. 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 dimensions, for a …

  4. 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 output shape of a …

  5. python - Keras Dense layer Output Shape - Stack Overflow

    For example, output shape of Dense layer is based on units defined in the layer where as output shape of Conv layer depends on filters. Another thing to remember is, by default, last dimension of any …

  6. How to find the size or shape of a DataFrame in PySpark?

    Why doesn't Pyspark Dataframe simply store the shape values like pandas dataframe does with .shape? Having to call count seems incredibly resource-intensive for such a common and simple operation.

  7. Numpy Typing with specific shape and datatype - Stack Overflow

    Feb 14, 2022 · Currently, shape type information is reflected in ndarray.shape. However, most numpy functions that change the dimension or size of an array, however, don't necessarily know how to …

  8. 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 seems to be stuck at …

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

    Jan 9, 2014 · 8 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 following …

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