Revert "Fix the type of patterns matrices"

This reverts commit c19fbe110611713a39d1f1be137b33e1bd3c6183.