Skip to content

Commit

Permalink
Quick bug fix for 2d numpy arrays of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-harter committed May 10, 2024
1 parent 6ec09a7 commit bf90608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdflib/cdfwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ def _convert_data(self, data_type: int, num_elems: int, num_values: int, indata:
return recs, struct.pack(form2, *datau)
elif isinstance(indata, np.ndarray):
if data_type == self.CDF_CHAR or data_type == self.CDF_UCHAR:
size = indata.size
size = len(np.atleast_1d(indata))
odata = ""
if size >= 1:
for x in range(0, size):
Expand Down

0 comments on commit bf90608

Please sign in to comment.