About 8,260,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. tensorflow placeholder - understanding `shape= [None,`

    You can think of a placeholder in TensorFlow as an operation specifying the shape and type of data that will be fed into the graph.placeholder X defines that an unspecified number of rows of …

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

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

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

  7. Add shadow to custom shape on Android - Stack Overflow

    Is it possible to add a drop shadow to a custom shape in Android? After looking through the documentation, I only see a way to apply a text shadow. I've tried this with no luck: <?xml …

  8. Manually scale color, shape, and linetype of multiple geoms ggplot2

    I have also tried solutions using a combination of scale_color_manual(), scale_linetype_manual(), and scale_shape_manual() (all with the same name argument that way they should end up in …

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

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