Skip to contents

Computes t(x) %*% y. If y is missing, computes t(x) %*% x.

Usage

nv_crossprod(x, y = NULL)

# S3 method for class 'AnvlBox'
crossprod(x, y = NULL, ...)

Arguments

x

(arrayish)
An array with at least 2 dimensions.

y

(arrayish | NULL)
Optional second array. If NULL, uses x.

...

Unused.

Value

arrayish

Examples

x <- nv_array(matrix(1:6, nrow = 3), dtype = "f32")
nv_crossprod(x)
#> AnvlArray
#>  14 32
#>  32 77
#> [ CPUf32{2,2} ]