Skip to content

Commit

Permalink
Update _pytdlpack.py
Browse files Browse the repository at this point in the history
Added logic to TdlpackRecord.pack() method to put plain language string back into the TDLPACK IS1 array.
  • Loading branch information
eengl committed May 5, 2020
1 parent c4175a1 commit b9458b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytdlpack/_pytdlpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,11 @@ def pack(self,dec_scale=1,bin_scale=0):
self.ipack = np.zeros((ND5),dtype=np.int32)
self.is1[16] = np.int32(dec_scale)

# Pack plain langauge into IS1 array.
self.plain = self.plain.ljust(NCHAR_PLAIN)
for n,p in enumerate(self.plain):
self.is1[22+n] = np.int32(ord(p))

# Handle potential NaN values
if self.primary_missing_value == 0:
self.primary_missing_value == DEFAULT_MISSING_VALUE
Expand Down

0 comments on commit b9458b5

Please sign in to comment.