utils.utilities

Module: utils.utilities

Collection of utility functions and classes

Some of these come from the matplotlib cbook module with thanks.

Functions

nipy.utils.utilities.is_iterable(obj)

Return True if obj is iterable

nipy.utils.utilities.is_numlike(obj)

Return True if obj looks like a number

nipy.utils.utilities.seq_prod(seq, initial=1)

General product of sequence elements

Parameters:

seq : sequence

Iterable of values to multiply.

initial : object, optional

Initial value

Returns:

prod : object

Result of ``initial * seq[0] * seq[1] .. ``.