Skip to content

Commit 9fde1c0

Browse files
committed
Replace other np.string_ references in the package.
1 parent b40cf0d commit 9fde1c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

labscript_devices/RFBlaster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def generate_code(self, hdf5_file):
183183
# contain embedded nulls'. Presumably our binary data
184184
# must contain nulls sometimes. So this crashes if we
185185
# don't convert to a numpy 'fixes length' string:
186-
binary_group.create_dataset('DDS%d'%dds, data=np.string_(binary_data))
186+
binary_group.create_dataset('DDS%d'%dds, data=np.bytes_(binary_data))
187187
finally:
188188
# Delete the temporary files:
189189
os.remove(temp_assembly_filepath)

labscript_devices/imaqdx_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _ensure_str(s):
3939
"""
4040
if isinstance(s, bytes):
4141
return s.decode()
42-
elif isinstance(s, np.string_):
42+
elif isinstance(s, np.bytes_):
4343
return str(s)
4444
else:
4545
return s
@@ -390,9 +390,9 @@ def transition_to_static(self, h5_filepath):
390390
dtype='uint16', compression='gzip')
391391
if self.imageify:
392392
# Specify this dataset should be viewed as an image
393-
dset.attrs['CLASS'] = np.string_('IMAGE')
394-
dset.attrs['IMAGE_VERSION'] = np.string_('1.2')
395-
dset.attrs['IMAGE_SUBCLASS'] = np.string_(
393+
dset.attrs['CLASS'] = np.bytes_('IMAGE')
394+
dset.attrs['IMAGE_VERSION'] = np.bytes_('1.2')
395+
dset.attrs['IMAGE_SUBCLASS'] = np.bytes_(
396396
'IMAGE_GRAYSCALE')
397397
dset.attrs['IMAGE_WHITE_IS_ZERO'] = np.uint8(0)
398398
print('Saved frame {:}'.format(exposure['frametype']))

0 commit comments

Comments
 (0)