Read 'NumPy' '.npy' and '.npz' Files

Lightweight way to read 'NumPy' '.npy' and '.npz' files in R. All data types supported by 'NumPy', with all sizes (converted internally to R native size), both C and 'Fortran' order, and any shape, up to an arbitrary number of dimensions, are supported.


grumpy

R-CMD-check Codecov testcoverage

The grumpy R package provides a way to read NumPy’s .npy files into R. It supports a wide range of data types and array shapes.

Installation

You can install the released version of grumpy with:

install.packages("grumpy")

and the development version like so:

# install.packages("pak")
pak::pak("Bisaloo/grumpy")

Example

library(grumpy)
read_npy(system.file("extdata", "test_2d.npy", package = "grumpy"))
#>      [,1] [,2] [,3] [,4]
#> [1,]    0    3    6    9
#> [2,]    1    4    7   10
#> [3,]    2    5    8   11

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("grumpy")

0.1.1 by Hugo Gruson, 5 months ago


https://hugogruson.fr/grumpy/, https://github.com/Bisaloo/grumpy


Report a bug at https://github.com/Bisaloo/grumpy/issues


Browse source code at https://github.com/cran/grumpy


Authors: Hugo Gruson [aut, cre, cph] (ORCID: , Mike Smith [aut, cph] (Original author of portions of the C code migrated from the Rarr package) , German Network for Bioinformatics Infrastructure - de.NBI [fnd]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports jsonlite

Suggests knitr, rmarkdown, testthat


See at CRAN