Skip to content

Commit

Permalink
remove additional np.object references
Browse files Browse the repository at this point in the history
  • Loading branch information
swsuggs committed Nov 6, 2023
1 parent 042c062 commit 385c183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions armory/data/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def __init__(self, x_shape, sample_rate, input_type=np.int64):


def canonical_audio_preprocess(context, batch):
if batch.dtype == np.object:
if batch.dtype == object:
for x in batch:
check_shapes(x.shape, context.x_shape)
assert x.dtype == context.input_type
Expand Down Expand Up @@ -1692,8 +1692,8 @@ def __init__(self, max_frames):
self.max_frames = max_frames

def __call__(self, batch):
if batch.dtype == np.object:
clipped_batch = np.empty_like(batch, dtype=np.object)
if batch.dtype == object:
clipped_batch = np.empty_like(batch, dtype=object)
clipped_batch[:] = [x[: self.max_frames] for x in batch]
return clipped_batch
else:
Expand Down

0 comments on commit 385c183

Please sign in to comment.