Skip to content

Commit

Permalink
Merge pull request #2001 from swsuggs/remove-np-object
Browse files Browse the repository at this point in the history
remove additional np.object references
  • Loading branch information
mwartell authored Nov 6, 2023
2 parents b60ea34 + 385c183 commit 629d77b
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 629d77b

Please sign in to comment.