| read_npy | R Documentation |
.npy fileRead a .npy file
read_npy(file, lazy = FALSE, ...)
file |
Path to the |
lazy |
If |
... |
Ignored. Reserved for future use. |
An array containing the data from the .npy file
# Array of integers. NumPy "<i4" dtype
read_npy(
system.file("extdata", "test_int32.npy", package = "grumpy")
)
# Array of logicals. NumPy "|b1" dtype
read_npy(
system.file("extdata", "test_bool.npy", package = "grumpy")
)
# Array of numerics. NumPy "<f8" dtype
read_npy(
system.file("extdata", "test_float64.npy", package = "grumpy")
)
# Array of strings. NumPy "<U" dtype
read_npy(
system.file("extdata", "test_str_unicode.npy", package = "grumpy")
)
# "Array" of lists. Numpy structured dtype
read_npy(
system.file("extdata", "test_structured.npy", package = "grumpy")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.