Commits

Matt Chaput  committed f36a348

Fixed use of array as a source for another array (raises error in PyPy).

  • Participants
  • Parent commits 34ae562
  • Branches flexisort

Comments (0)

Files changed (1)

File src/whoosh/filedb/fieldcache.py

                 newcode = "H"
             
             if newcode != order.typecode:
-                order = array(newcode, order)
+                # Can't use an array as the source for another array
+                order = array(newcode, iter(order))
                 typecode = newcode
         
         return cls(order, texts, hastexts=hastexts, typecode=typecode)
                 newcode = "B"
             elif len(self.texts) < 65535:
                 newcode = "H"
-            
             if newcode != self.order.typecode:
-                self.order = array(newcode, self.order)
+                self.order = array(newcode, iter(self.order))
                 self.typecode = newcode
         else:
             dbfile.write_uint(0)  # No texts
     
     def groups(self, docnums, counts=False):
         """Returns a dictionary mapping key values to document numbers. If
-        ``counts_only`` is True, the returned dictionary maps key values to the
+        ``counts`` is True, the returned dictionary maps key values to the
         number of documents in that 
         """