Miscellaneous routines#

Performance tuning#

setbufsize(size)

Set the size of the buffer used in ufuncs.

getbufsize()

Return the size of the buffer used in ufuncs.

Memory ranges#

shares_memory(a, b, /[, max_work])

Determine if two arrays share memory.

may_share_memory(a, b, /[, max_work])

Determine if two arrays might share memory

byte_bounds(a)

Returns pointers to the end-points of an array.

Array mixins#

lib.mixins.NDArrayOperatorsMixin()

Mixin defining all operator special methods using __array_ufunc__.

NumPy version comparison#

lib.NumpyVersion(vstring)

Parse and compare numpy version strings.

Utility#

get_include()

Return the directory that contains the NumPy *.h header files.

show_config()

Show libraries in the system on which NumPy was built.

show_runtime()

Print information about various resources in the system including available intrinsic support and BLAS/LAPACK library in use

deprecate(*args, **kwargs)

Issues a DeprecationWarning, adds warning to old_name's docstring, rebinds old_name.__name__ and returns the new function object.

deprecate_with_doc(msg)

Deprecates a function and includes the deprecation in its docstring.

broadcast_shapes(*args)

Broadcast the input shapes into a single shape.

Matlab-like Functions#

who([vardict])

Print the NumPy arrays in the given dictionary.

disp(mesg[, device, linefeed])

Display a message on a device.

Exceptions and Warnings (numpy.exceptions)#

General exceptions used by NumPy. Note that some exceptions may be module specific, such as linear algebra errors.

New in version NumPy: 1.25

The exceptions module is new in NumPy 1.25. Older exceptions remain available through the main NumPy namespace for compatibility.

Warnings#

ComplexWarning

The warning raised when casting a complex dtype to a real dtype.

VisibleDeprecationWarning

Visible deprecation warning.

Exceptions#

AxisError(axis[, ndim, msg_prefix])

Axis supplied was invalid.

DTypePromotionError

Multiple DTypes could not be converted to a common one.

TooHardError

max_work was exceeded.