NumPy

NumPy is the fundamental package needed for scientific computing with Python.
Download

NumPy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • NumPy Development Team
  • Publisher web site:
  • http://numeric.scipy.org/

NumPy Tags


NumPy Description

NumPy is the fundamental package needed for scientific computing with Python. NumPy is the fundamental package needed for scientific computing with Python.This package contains a powerful N-dimensional array object, sophisticated (broadcasting) functions, tools for integrating C/C++ and Fortran code, and useful linear algebra, Fourier transform, and random number capabilities.It derives from the old Numeric code base and can be used as a replacement for Numeric. It also adds the features introduced by numarray and can be used to replace numarray.Numeric users should find the transition very easy. There is a module (import numpy.lib.convertcode --- see the convertall and fromfile functions in that module) that can make (most of) the necessary changes to your Python code that used Numeric to make it work with the new NumPy.Users of numarray currently need to do a bit more work (mostly import changes) to work with the new system because nobody has yet written an equivalent to convertcode.py Here are some key features of "NumPy": · More data types (all standard C-data types plus complex floats, boolean, string, unicode, and void *). · Flexible data types where each array can have a different itemsize (but all elements of the same array still have the same itemsize). · Data types are Python objects · Data types have a type attribute that is a typeobject placing the data-type in a hierarchy of data-types. · Named fields are supported intrinsically on arrays. Record arrays allow named-field access using attributes. · Many more array methods in addition to functional counterparts. · Attributes more clearly distinguished from methods (attributes are intrinsic parts of an array so that setting them changes the array itself). · Array scalars covering all data types which inherit from Python scalars when appropriate. · Arrays can be misaligned, swapped, and in Fortran order in memory (facilitates memory-mapped arrays). · Arrays can be more easily read from text files and created from buffers. · Arrays can be quickly written to files in text and/or binary mode. · Arrays inherit from big arrays which do not define the sequence, or buffer protocol and can therefore be very large on 64-bit platforms. · Fancy indexing can be done on arrays using integer sequences and boolean masks. · Coercion rules are altered for mixed scalar / array operations so that scalars (anything that produces a 0-dimensional array internally) will not determine the output type in such cases. · When coercion is needed, temporary buffer-memory allocation is limited to a user-adjustable size. · Errors are handled through the IEEE floating point status flags and there is flexibility on a per function / module / builtin level for handling these errors. · One can register an error callback function in Python to handle errors which are set to 'call' for their error handling; · Ufunc reduce, accumulate, and reduceat can take place using a different type then the array type if desired (without copying the entire array); · Ufunc output arrays passed in can be a different type than expected from the calculation. · Arbitrary classes can be passed through ufuncs (using __array_wrap__ and __array_priority__). · Ufuncs can be easily created from Python functions. · Ufuncs have attributes to detail their behavior, including a dynamic doc string that automatically generates the calling signature. · Several new ufuncs (frexp, modf, ldexp, isnan, isfinite, isinf, signbit). · New types can be registered with the system so that specialized ufunc loops can be written for fast support of new type objects. · C-API enhanced so that more of the functionality is available from extension modules. · C-API enhanced so array structure access can take place through macros. · New iterator objects created for easy handling in C of discontiguous arrays. · Types have more functions associated with them (no magic function lists in the C-code). Any function needed is part of the type structure. What's New in This Release: · This minor includes numerous bug fixes, official python 2.6 support, and several new features such as generalized ufuncs.


NumPy Related Software