Skip to contents

drop() removes axes of length one. For base R objects this dispatches to base::drop(), while drop.mlx() delegates to mlx_squeeze() so that mlx arrays remain on the device.

Usage

drop(x)

# Default S3 method
drop(x)

# S3 method for class 'mlx'
drop(x)

Arguments

x

Object to drop dimensions from.

Value

An object with singleton dimensions removed. For mlx inputs the result is another mlx array.