Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Identifiez-vous
Identifiant
Mot de passe
Mot de passe oublié ?
Créer un compte

Vous n'avez pas encore de compte Developpez.com ? L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !

Developpez.com

Python

Choisissez la catégorie, puis la rubrique :

7.2.5.2 Complex Numbers as Python Objects

7.2.5.2 Complex Numbers as Python Objects

PyComplexObject
This subtype of PyObject represents a Python complex number object.

PyTypeObject PyComplex_Type
This instance of PyTypeObject represents the Python complex number type. It is the same object as complex and types.ComplexType.

int PyComplex_Check(PyObject *p)
Return true if its argument is a PyComplexObject or a subtype of PyComplexObject. Changed in version 2.2: Allowed subtypes to be accepted.

int PyComplex_CheckExact(PyObject *p)
Return true if its argument is a PyComplexObject, but not a subtype of PyComplexObject. New in version 2.2.

PyObject* PyComplex_FromCComplex(Py_complex v)
Return value: New reference.
Create a new Python complex number object from a C Py_complex value.

PyObject* PyComplex_FromDoubles(double real, double imag)
Return value: New reference.
Return a new PyComplexObject object from real and imag.

double PyComplex_RealAsDouble(PyObject *op)
Return the real part of op as a C double.

double PyComplex_ImagAsDouble(PyObject *op)
Return the imaginary part of op as a C double.

Py_complex PyComplex_AsCComplex(PyObject *op)
Return the Py_complex value of the complex number op.

See About this document... for information on suggesting changes.
Contacter le responsable de la rubrique Python

Partenaire : Hébergement Web