def makeImgPatchPrototype(D, compID):
  ''' Create image patch prototype for specific component
      Returns
      --------
      Xprototype : sqrt(D) x sqrt(D) matrix
  '''
  # Create a "prototype" image patch of PxP pixels  
  P = np.sqrt(D)
  Xprototype = np.zeros((P,P))
  if compID % 4 == 0:
    Xprototype[:P/2] = 1.0
    Xprototype = np.rot90( Xprototype, compID/4 )
  if compID % 4 == 1:
    Xprototype[np.tril_indices(P)] = 1
    Xprototype = np.rot90( Xprototype, (compID-1)/4 )
  if compID % 4 == 2:
    Xprototype[np.tril_indices(P, 2)] = 1
    Xprototype = np.rot90( Xprototype, (2-compID)/4 )
  if compID % 4 == 3:
    Xprototype[np.tril_indices(P, -2)] = 1
    Xprototype = np.rot90( Xprototype, (compID-3)/4 )
  return Xprototype
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/demodata/DeadLeaves.py/makeImgPatchPrototype/swapped operands of `-`