code: def pattern_of(index):
      '''Return the pattern represented by an index value'''
      return np.array([[index & 2**0,index & 2**1,index & 2**2],
                       [index & 2**3,index & 2**4,index & 2**5],
                       [index & 2**6,index & 2**7,index & 2**8]], boolf pattern_of(index):
      '''Return the pattern represented by an index value'''
      return np.array([[index & 2**0,index & 2**1,index & 2**2],
                       [index & 2**3,index & 2**4,index & 2**5],
                       [index & 2**6,index & 2**7,index & 2**8]], bool)
docs: Return the pattern represented by an index value