About 147,000 results
Open links in new tab
  1. numpy.shape — NumPy v2.4 Manual

    numpy.shape # numpy.shape(a) [source] # Return the shape of an array. Parameters: aarray_like Input array. Returns: shapetuple of ints The elements of the shape tuple give the lengths of the …

  2. NumPy Shape And Array Dimensions In Python

    May 8, 2025 · Learn how to use NumPy shape in Python to understand and manipulate array dimensions. Examples with real-world data, reshaping techniques, and common solutions.

  3. NumPy Array Shape - W3Schools

    NumPy arrays have an attribute called shape that returns a tuple with each index having the number of corresponding elements. Print the shape of a 2-D array: The example above returns …

  4. NumPy Array Shape - GeeksforGeeks

    Jul 15, 2025 · The shape of an array can be defined as the number of elements in each dimension. Dimension is the number of indices or subscripts, that we require in order to …

  5. Python shape () method - All you need to know! - DigitalOcean

    Aug 3, 2022 · With the shape () method, comes the flexibility to obtain the dimensions of any Python object. Yes, it returns a tuple value that indicates the dimensions of a Python object.

  6. How to Shape and Size of Array in Python - Delft Stack

    Mar 4, 2025 · Learn how to determine the shape and size of arrays in Python using NumPy's shape () and size () functions. This article provides clear examples, detailed explanations, and …

  7. NumPy shape () - Programiz

    shape () Return Value The shape() method returns the shape of an array as a tuple.

  8. Python Shape: Understanding and Manipulating Geometric Forms in Python ...

    Jan 30, 2025 · This blog post will explore the fundamental concepts of shape in Python, its usage methods across different libraries, common practices, and best practices.

  9. NumPy: Get the dimensions, shape, and size of an array

    Apr 23, 2025 · You can get the number of dimensions, the shape (length of each dimension), and the size (total number of elements) of a NumPy array (numpy.ndarray) using the ndim, shape, …

  10. How to Get NumPy Array Shape? - Spark By Examples

    Feb 13, 2025 · In this article, I have explained how to get the shape of a Python NumPy array by using numpy.ndarray.shape properties with examples. This returns a tuple with the number of …