In general, these docstrings are a bit lacking -- no mention of support for boolean matrices; no specification of return type -- but maybe we should fix that up at another point.