% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tensors.R
\name{ggml_tensor_shape}
\alias{ggml_tensor_shape}
\title{Get Tensor Shape}
\usage{
ggml_tensor_shape(tensor)
}
\arguments{
\item{tensor}{Tensor pointer}
}
\value{
Numeric vector of length 4 with dimensions
}
\description{
Returns the shape of a tensor as a numeric vector of 4 elements (ne0, ne1, ne2, ne3)
}
\examples{
\donttest{
ctx <- ggml_init(1024 * 1024)
t <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 10, 20)
ggml_tensor_shape(t)
ggml_free(ctx)
}
}
