Skip to content

Commit 5c04d2a

Browse files
authored
[CODEDMOD] replace all uses of np.string_ with np.bytes_
Differential Revision: D74099774 Pull Request resolved: #3905
1 parent d60ce09 commit 5c04d2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/hubert/dataset/hubert_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def _load_labels(self, label_dir: Path, dataset: str, subset: str) -> np.array:
316316
with open(label_dir / f"label_{subset}.pt") as f:
317317
labels = [line.rstrip() for line in f]
318318
labels = [labels[i] for i in self.ind_list]
319-
return np.asarray(labels, dtype=np.string_)
319+
return np.asarray(labels, dtype=np.bytes_)
320320

321321
def __getitem__(self, index):
322322
waveform = self._load_audio(index)

examples/self_supervised_learning/data_modules/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def _load_labels(self, label_dir: Path, dataset: str, subset: str) -> np.array:
312312
with open(label_dir / f"label_{subset}.pt") as f:
313313
labels = [line.rstrip() for line in f]
314314
labels = [labels[i] for i in self.ind_list]
315-
return np.asarray(labels, dtype=np.string_)
315+
return np.asarray(labels, dtype=np.bytes_)
316316

317317
def __getitem__(self, index):
318318
waveform = self._load_audio(index)

0 commit comments

Comments
 (0)