-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparse_npy_datatype.Rd
More file actions
32 lines (31 loc) · 962 Bytes
/
Copy pathparse_npy_datatype.Rd
File metadata and controls
32 lines (31 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_npy.R
\name{parse_npy_datatype}
\alias{parse_npy_datatype}
\title{Parse a NumPy Array-protocol type strings}
\usage{
parse_npy_datatype(descr)
}
\arguments{
\item{descr}{A NumPy dtype description string, or a list of such strings for
structured dtypes}
}
\value{
A list containing the parsed data type information, including the
base type, the number of bytes, and the endianness
}
\description{
Parse a NumPy Array-protocol type strings
}
\details{
If a \code{list} is passed to \code{descr}, each element can be of length 1, or of
length 2 in which case the first element corresponds to the name of the field
and the second to its dtype.
}
\examples{
parse_npy_datatype(">i8")
parse_npy_datatype("|b1")
# A structured datatype where each element has 3 components, all integers,
# named "r", "g" and "b".
parse_npy_datatype(list(c("r", "<i8"), c("g", "<i8"), c("b", "<i8")))
}