mvpa2.misc.supportΒΆ
Support function – little helpers in everyday life
Functions
array_whereequal(a, x) |
Reliable comparison for numpy.ndarray |
copy(x) |
Shallow copy operation on arbitrary Python objects. |
deepcopy(x[, memo, _nil]) |
Deep copy operation on arbitrary Python objects. |
get_break_points(items[, contiguous]) |
Return a list of break points. |
get_limit_filter(limit, collection) |
Create a filter array from a limit definition. |
get_nelements_per_value(data) |
Returns the number of elements per unique value of some sequence. |
get_rng([r]) |
Return instantiated numpy.random.RandomState given r. |
idhash(val) |
Craft unique id+hash for an object |
indent_doc(v) |
Given a value returns a string where each line is indented |
is_in_volume(coord, shape) |
For given coord check if it is within a specified volume size. |
is_sequence_type |
isSequenceType(a) – Return True if a has a sequence type, False otherwise. |
is_sorted(items) |
Check if listed items are in sorted order. |
mask2slice(mask) |
Convert a boolean mask vector into an equivalent slice (if possible). |
ncombinations(n, k) |
A fast way to calculate binomial coefficients by Andrew Dalke |
pathjoin(a, \*p) |
Join two or more pathname components, inserting ‘/’ as needed. |
reuse_absolute_path(file1, file2[, force]) |
Use path to file1 as the path to file2 is no absolute |
rfe_history_to_maps(history) |
Convert history generated by RFE into the array of binary maps |
transform_with_boxcar(data, startpoints, ...) |
This function extracts boxcar windows from an array. |
unique_combinations(L, n[, sort]) |
Return unique combinations form a list L of objects in groups of size n. |
value2idx(val, x[, solv]) |
Convert a value into an index of the closes matching array element. |
version_to_tuple(v) |
Convert literal string into a tuple, if possible of ints |
xrandom_iterprod(n, \*seq) |
Generate n random iterprod’s from given sequences |
xrandom_unique_combinations(L, n[, k]) |
Generator of unique combinations form a list L of objects in |
xunique_combinations(L, n) |
Generator of unique combinations form a list L of objects in groups of size n. |
Classes
Event(\*\*kwargs) |
Simple class to define properties of an event. |
MapOverlap([overlap_threshold]) |
Compute some overlap stats from a sequence of binary maps. |
SmartVersion([vstring]) |
A bit evolved comparison of versions |
Version([vstring]) |
Abstract base class for version numbering classes. |
product |
product(*iterables) –> product object |



