About 60,700,000 results
Open links in new tab
  1. Python shape() method - All you need to know! - DigitalOcean

    Aug 4, 2022 · Usually, on a broader scale, the shape() method is used to fetch the dimensions of Pandas and NumPy type objects in python. Every value represented by the tuple corresponds …

  2. NumPy Array Shape - W3Schools

    Get the Shape of an Array. NumPy arrays have an attribute called shape that returns a tuple with each index having the number of corresponding elements.

  3. NumPy Array Shape - GeeksforGeeks

    Dec 28, 2023 · How can we get the Shape of an Array? In NumPy, we will use an attribute called shape which returns a tuple, the elements of the tuple give the lengths of the corresponding …

  4. numpy.shape — NumPy v2.2 Manual

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

  5. NumPy Shape and Array Dimensions in Python - Python Guides

    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.

  6. python - What does .shape [] do in "for i in range (Y.shape [0 ...

    In Python shape() is use in pandas to give number of row/column: Number of rows is given by: train = pd.read_csv('fine_name') //load the data train.shape[0] Number of columns is given by . …

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

  8. NumPy shape() - Programiz

    The shape() method returns the shape of an array i.e. the number of elements in each dimension. Example import numpy as np array = np.array([[0, 1], [2, 3]])

  9. Python Shape Function: Find Dimensions of Arrays and DataFrames

    Jul 6, 2021 · In this tutorial, we’ve learned how to use the shape function in Python to find the dimensions of NumPy arrays and Pandas DataFrames. This versatile function is essential for …

  10. 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. Table of Contents. …

  11. Some results have been removed
Refresh