Checks whether the object has a tensor attribute.

is.tensor(X)

Arguments

X

the objected to be checked

Value

boolean

Details

This is a simple convenience function to check for the property of being a tensor.

See also

Author

K. Gerald van den Boogaart

Examples

A <- matrix(1:9,nrow=3)
is.tensor(A) # no
#> [1] FALSE
A <- to.tensor(A)
is.tensor(A) # yes
#> [1] TRUE