sandbox.stats.multicomp.set_remove_subs()

statsmodels.sandbox.stats.multicomp.set_remove_subs

statsmodels.sandbox.stats.multicomp.set_remove_subs(ssli) [source]

remove sets that are subsets of another set from a list of tuples

Parameters:

ssli : list of tuples

each tuple is considered as a set

Returns:

part : list of tuples

new list with subset tuples removed, it is sorted by set-length of tuples. The list contains original tuples, duplicate elements are not removed.

Examples

>>> set_remove_subs([(0, 1), (1, 2), (1, 2, 3), (0,)])
[(1, 2, 3), (0, 1)]
>>> set_remove_subs([(0, 1), (1, 2), (1,1, 1, 2, 3), (0,)])
[(1, 1, 1, 2, 3), (0, 1)]

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.sandbox.stats.multicomp.set_remove_subs.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部