# Specifying htype is recommended for maximizing performance.
# Specifying dtype is required if you desire a different dtype compared
# to the default dtype for the specified htype.
ds.create_tensor('my_tensor', htype = 'bbox', dtype = 'int32')
ds.create_tensor('localization/my_tensor', htype = 'bbox', dtype = 'float32')
# Specifiying the correct compression is critical for images, videos, and
ds.create_tensor('images', htype = 'image', sample_compression = 'jpeg')
# Append a single sample array at the end of a tensor
ds.my_tensor.append(np.ones((1,4))) # Appends an array at the end of a tensor
# Append multiple samples at the end of a tensor. The first axis in the
# numpy array is assumed to be the sample axis for the tensor
ds.my_tensor.extend(np.ones((5,1,4)))
# Append multiple samples at the end of a tensor.
ds.my_tensor.extend([np.ones((1,4)), np.ones((3,4)), np.ones((2,4))])