O'Reilly logo

Python Essential Reference, Second Edition by David M Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mathematics

The modules in this section provide a variety of mathematical functions.

array

The array module defines a new object type ArrayType that works almost exactly like other sequence types except that its contents are constrained to a single type. The type of an array is determined at the time of creation, using one of the following typecodes:

Type Code Description C Type Minimum Size (in bytes)
'c' 8-bit character char 1
'b' 8-bit integer signedchar 1
'B' 8-bit unsigned integer unsignedchar 1
'h' 16-bit integer short 2
'H' 16-bit unsigned integer unsignedshort 2
'i' integer int 4 or 8
'I' unsigned integer unsigned int 4 or 8
'l' long integer long 4 or 8
'L' unsigned long integer unsigned long 4 or 8
'f' single-precision float float ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required