eelbrain.Factor.get_index_to_match¶
-
Factor.
get_index_to_match
(self, other)¶ Generate index to conform to another Factor’s order
Assuming that
other
is a reordered version of self,get_index_to_match()
generates an index to transform from the order ofself
to the order ofother
. To guarantee exact matching, each value can only occur once inself
.Examples
>>> index = factor1.get_index_to_match(factor2) >>> all(factor1[index] == factor2) True