Skip to content
This repository has been archived by the owner on Mar 31, 2019. It is now read-only.

Commit

Permalink
more explicit .tostring()s
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Feb 2, 2018
1 parent 8255ec1 commit 1da0f82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions oamap/source/shelve.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def fromdata(self, key, value, schema=None, inferencelimit=None, partitionlimit=
partitionlookup.append(arrays[generator.stops][0] - arrays[generator.starts][0], arrays.keys())

for n, x in arrays.items():
self.dbm[_asbytes(self.ARRAY + partitionlookup.id2name(n, 0))] = x
self.dbm[_asbytes(self.ARRAY + dataset.partitioning.key)] = numpy.array(partitionlookup)
self.dbm[_asbytes(self.ARRAY + partitionlookup.id2name(n, 0))] = x.tostring()
self.dbm[_asbytes(self.ARRAY + dataset.partitioning.key)] = numpy.array(partitionlookup).tostring()

self.dbm[_asbytes(self.DATASET + key)] = dataset.tojsonstring()

Expand All @@ -232,8 +232,8 @@ def fromdata(self, key, value, schema=None, inferencelimit=None, partitionlimit=
partitionlookup.append(numentries, arrays.keys())

for n, x in arrays.items():
self.dbm[_asbytes(self.ARRAY + partitionlookup.id2name(n, partitionid))] = x
self.dbm[_asbytes(self.ARRAY + dataset.partitioning.key)] = numpy.array(partitionlookup)
self.dbm[_asbytes(self.ARRAY + partitionlookup.id2name(n, partitionid))] = x.tostring()
self.dbm[_asbytes(self.ARRAY + dataset.partitioning.key)] = numpy.array(partitionlookup).tostring()

def __setitem__(self, key, value):
self.fromdata(key, value)
Expand Down

0 comments on commit 1da0f82

Please sign in to comment.