Skip to content

Commit 53006d7

Browse files
committed
FIX: replaced deprecated calls to numpy.tostring()
1 parent 6816d8f commit 53006d7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pyart/io/mdv_common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def _write_a_field(self, fnum):
675675
np_form = ">f"
676676
else:
677677
raise NotImplementedError("encoding: ", encoding_type)
678-
uncompr_data = np.array(sw_data, dtype=np_form).tostring()
678+
uncompr_data = np.array(sw_data, dtype=np_form).tobytes()
679679
compr_data = zlib.compress(uncompr_data)
680680
if len(compr_data) > len(uncompr_data):
681681
magic = 0xF6F6F6F6
@@ -875,7 +875,6 @@ def _get_chunks(self, debug=False):
875875
# the file pointer must be set at the correct location prior to call
876876
radar_info, elevations, calib_info = None, [], None
877877
for cnum, curr_chunk_header in enumerate(self.chunk_headers):
878-
879878
chunk_id = curr_chunk_header["chunk_id"]
880879
self.fileptr.seek(curr_chunk_header["chunk_data_offset"])
881880

@@ -1181,7 +1180,7 @@ def _decode_rle8(compr_data, key, decompr_size):
11811180
out[out_ptr : out_ptr + count] = value
11821181
data_ptr += 3
11831182
out_ptr += count
1184-
return out.tostring()
1183+
return out.tobytes()
11851184

11861185

11871186
class _MdvVolumeDataExtractor:

0 commit comments

Comments
 (0)