Région de recherche :

Date :

https://numpy.org › doc › stable › user › basics.types.html

Data types — NumPy v2.1 Manual

Learn how to create and manipulate arrays with different numerical and string data types in NumPy. See the available types, their bit-widths, byte-orders, and how to convert them.

https://numpy.org › doc › stable › reference › arrays.dtypes.html

Data type objects (dtype) — NumPy v2.1 Manual

Learn how to create and use data type objects (dtype) to describe the memory layout and interpretation of array items in NumPy. See examples of scalar, structured and sub-array data types, and how to specify byte order, size and alignment.

https://www.geeksforgeeks.org › numpy-data-types

Numpy data Types - GeeksforGeeks

NumPy is a powerful Python library that can manage different types of data. Here we will explore the Datatypes in NumPy and How we can check and create datatypes of the NumPy array. DataTypes in NumPy. A data type in NumPy is used to specify the type of data stored in a variable.

Numpy data Types - GeeksforGeeks

https://www.w3schools.com › python › numpy › numpy_data_types.asp

NumPy Data Types - W3Schools

Learn how to use and manipulate data types in NumPy, a Python library for scientific computing. Find out the characters, properties and methods for creating and converting arrays with different data types.

https://numpy.org › doc › 1.20 › user › basics.types.html

Data types — NumPy v1.20 Manual

Data-types can be used as functions to convert python numbers to array scalars (see the array scalar section for an explanation), python sequences of numbers to arrays of that type, or as arguments to the dtype keyword that many numpy functions or methods accept. Some examples:

https://runebook.dev › fr › docs › numpy › user › basics.types

NumPy - Data types [fr] - Runebook.dev

Les types numériques NumPy sont des instances d'objets dtype (type de données), chacun ayant des caractéristiques uniques. Une fois que vous avez importé NumPy à l'aide de >>> import numpy as np , les types sont disponibles sous la forme np.bool_ , np.float32 , etc.

https://www.delftstack.com › fr › tutorial › python-numpy › numpy-datatype-and-conversion

Tutoriel Numpy - Type de données NumPy et conversion

Type de données NumPy. Lors de la création d’une nouvelle donnée ndarray, vous pouvez définir le type de données de l’élément par des constantes de type chaîne ou ou de données dans la bibliothèque NumPy. import numpy as np. # by string . test = np.array([4, 5, 6], dtype="int64") # by data type constant in numpy .

https://runebook.dev › fr › docs › numpy › reference › arrays.dtypes

NumPy - dtype object [fr] - Runebook.dev

Un type de données structurées contenant une chaîne de 16 caractères (dans le champ « nom ») et un sous-tableau de deux nombres à virgule flottante de 64 bits (dans le champ « notes ») : >>>dt = np.dtype ( [ ('name', np.unicode_, 16), ('grades', np.float64, (2,))])>>>dt ['name'] dtype ('<U16') >>>dt ['grades'] dtype ( ('<f8', (2,)))

https://docs.scipy.org › doc › numpy-1.13.0 › reference › arrays.dtypes.html

Data type objects (dtype) — NumPy v1.13 Manual - SciPy.org

Data type objects (dtype) ¶. A data type object (an instance of numpy.dtype class) describes how the bytes in the fixed-size block of memory corresponding to an array item should be interpreted. It describes the following aspects of the data: Type of the data (integer, float, Python object, etc.)

https://stackoverflow.com › questions › 9452775

Converting numpy dtypes to native python types - Stack Overflow

Use val.item() to convert most NumPy values to a native Python type: import numpy as np. # for example, numpy.float32 -> python float. val = np.float32(0) pyval = val.item() print(type(pyval)) # <class 'float'> # and similar... type(np.float64(0).item()) # <class 'float'> type(np.uint32(0).item()) # <class 'int'>