Browse code

remove superfluous code block from operator

Joseph Weston authored on 25/11/2019 16:41:08
Showing 1 changed files
... ...
@@ -544,12 +544,6 @@ cdef class _LocalOperator:
544 544
         elif ket.shape != (tot_norbs,):
545 545
             raise ValueError('ket vector is incorrect shape')
546 546
 
547
-        where = np.asarray(self.where)
548
-        where.setflags(write=False)
549
-        if self.where.shape[1] == 1:
550
-            # if `where` just contains sites, then we want a strictly 1D array
551
-            where = where.reshape(-1)
552
-
553 547
         result = np.zeros((self.where.shape[0],), dtype=complex)
554 548
         self._operate(out_data=result, bra=bra, ket=ket, args=args,
555 549
                       params=params, op=MAT_ELS)