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

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

  3. array.shape() giving error tuple not callable - Stack Overflow

    Aug 4, 2014 · I have a 2D numpy array called results, which contains its own array of data, and I want to go into it and use each list: for r in results: print "r:" print r y_pred = np.arra...

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

  5. android - How to set shape's opacity? - Stack Overflow

    Jun 4, 2015 · I already know how to set the opacity of the background image but I need to set the opacity of my shape object. In my Android app, I have it like this: and I want to make this black …

  6. raise ValueError(f"Cannot convert '{shape}' to a shape.") ValueError ...

    Feb 27, 2024 · shape: A shape tuple (integers), not including the batch size. For instance, shape= (32,) indicates that the expected input will be batches of 32-dimensional vectors. Elements of …

  7. python - ValueError: shape mismatch: objects cannot be broadcast …

    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.

  8. Pandas Dataframe ValueError: Shape of passed values is (X, ), …

    Pandas Dataframe ValueError: Shape of passed values is (X, ), indices imply (X, Y) Asked 12 years ago Modified 7 years, 8 months ago Viewed 60k times

  9. How do I get the row count of a Pandas DataFrame?

    Apr 11, 2013 · There's one good reason why to use shape in interactive work, instead of len (df): Trying out different filtering, I often need to know how many items remain. With shape I can …

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