Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove additional np.object references #2001

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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