The Numeric Package
The main module in the Numeric
package is the Numeric
module, which supplies the array
type, functions that act on array instances, and so-called “universal functions” that operate on arrays and other sequences. Numeric
is one of the few Python packages that is often used with the idiom from Numeric import *
, even though that idiom does give occasional problems even in this case. A popular alternative, probably the best compromise between conciseness and clarity, is to import Numeric
with a short name (e.g., import Numeric as N
) and qualify each name by preceding it with N
.
Get Python in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.