NumPy ndarray: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 2: Line 2:
* [[Numpy_Concepts#numpy|Numpy Concepts]]
* [[Numpy_Concepts#numpy|Numpy Concepts]]
=Overview=
=Overview=
<code>ndarray</code> is an N-dimensional array object. It is a fast, flexible container for large  datasets in Python. It is used to implement a Pandas [[Pandas_Series#Overview|Series]]. It allows performing mathematical operations on whole blocks of data using similar syntax to the equivalent operation between scalar elements.
<code>ndarray</code> is an N-dimensional array object. It is a fast, flexible container for large  datasets in Python. It is used to implement a Pandas [[Pandas_Series#Overview|Series]]. It allows performing mathematical operations on whole blocks of data using similar syntax to the equivalent operation between scalar elements. <code>ndarray</code>s are homogeneous, all elements of an <code>ndarray</code> instance have the same [[#Data_Type|data type]]. <code>ndarray</code>s can be created by converting Python data structures, using generators, or initializing blocks of memory of specified shape with specified values.
 
=<tt>ndarray</tt> Creation=
==Convert Python Data Structures==
==With Generators==
==By Specifying Shape and Value==
 
=<span id='Data_Type'></span>Element Data Type=

Revision as of 19:33, 20 May 2024

Internal

Overview

ndarray is an N-dimensional array object. It is a fast, flexible container for large datasets in Python. It is used to implement a Pandas Series. It allows performing mathematical operations on whole blocks of data using similar syntax to the equivalent operation between scalar elements. ndarrays are homogeneous, all elements of an ndarray instance have the same data type. ndarrays can be created by converting Python data structures, using generators, or initializing blocks of memory of specified shape with specified values.

ndarray Creation

Convert Python Data Structures

With Generators

By Specifying Shape and Value

Element Data Type