All Projects → xtensor-stack → xtensor-r

xtensor-stack / xtensor-r

Licence: BSD-3-Clause license
R bindings for xtensor

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
r
7636 projects

Projects that are alternatives of or similar to xtensor-r

NDScala
N-dimensional arrays in Scala 3. Think NumPy ndarray, but type-safe over shapes, array/axis labels & numeric data types
Stars: ✭ 37 (-55.42%)
Mutual labels:  numpy, ndarray
tapmap
Command line keyboard heatmap generator.
Stars: ✭ 19 (-77.11%)
Mutual labels:  numpy
Pyfasttext
Yet another Python binding for fastText
Stars: ✭ 229 (+175.9%)
Mutual labels:  numpy
h3ron
Rust crates for the H3 geospatial indexing system
Stars: ✭ 52 (-37.35%)
Mutual labels:  ndarray
Neural Network From Scratch
Ever wondered how to code your Neural Network using NumPy, with no frameworks involved?
Stars: ✭ 230 (+177.11%)
Mutual labels:  numpy
numphp
PHP tools for matrix computation
Stars: ✭ 25 (-69.88%)
Mutual labels:  ndarray
Deeplearning cv notes
📓 deepleaning and cv notes.
Stars: ✭ 223 (+168.67%)
Mutual labels:  numpy
python cv AI ML
用python做计算机视觉,人工智能,机器学习,深度学习等
Stars: ✭ 73 (-12.05%)
Mutual labels:  numpy
galois
A performant NumPy extension for Galois fields and their applications
Stars: ✭ 106 (+27.71%)
Mutual labels:  numpy
rRofex
R library to connect to Matba Rofex's Trading API. Functionality includes accessing account data and current holdings, retrieving investment quotes, placing and canceling orders, and getting reference data for instruments.
Stars: ✭ 21 (-74.7%)
Mutual labels:  rlang
Datasets
TFDS is a collection of datasets ready to use with TensorFlow, Jax, ...
Stars: ✭ 3,094 (+3627.71%)
Mutual labels:  numpy
Einops
Deep learning operations reinvented (for pytorch, tensorflow, jax and others)
Stars: ✭ 4,022 (+4745.78%)
Mutual labels:  numpy
PyTorch.docs
Offline documentation built from official PyTorch release
Stars: ✭ 105 (+26.51%)
Mutual labels:  numpy
Jetson Containers
Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
Stars: ✭ 223 (+168.67%)
Mutual labels:  numpy
Computational-Intelligence-Tutorials
This is the repository of codes written in class.
Stars: ✭ 36 (-56.63%)
Mutual labels:  numpy
Bootcamp python
Bootcamp to learn Python for Machine Learning
Stars: ✭ 228 (+174.7%)
Mutual labels:  numpy
Block
An intelligent block matrix library for numpy, PyTorch, and beyond.
Stars: ✭ 254 (+206.02%)
Mutual labels:  numpy
idx2numpy
A Python package which provides tools to convert files to and from IDX format (described at http://yann.lecun.com/exdb/mnist/) into numpy.ndarray.
Stars: ✭ 22 (-73.49%)
Mutual labels:  ndarray
Data-Wrangling-with-Python
Simplify your ETL processes with these hands-on data sanitation tips, tricks, and best practices
Stars: ✭ 90 (+8.43%)
Mutual labels:  numpy
Udacity-Data-Analyst-Nanodegree
Repository for the projects needed to complete the Data Analyst Nanodegree.
Stars: ✭ 31 (-62.65%)
Mutual labels:  numpy

xtensor-r

Travis Appveyor Documentation Join the Gitter Chat

R bindings for the xtensor C++ multi-dimensional array library.

  • xtensor is a C++ library for multi-dimensional arrays enabling numpy-style broadcasting and lazy computing.

  • xtensor-r enables inplace use of R arrays in C++ with all the benefits from xtensor

xtensor-r can be used either to author C++ extensions for R with Rcpp, or applications that embed the R interpreter with RInside.

Example

#include <numeric>                    // Standard library import for std::accumulate
#define STRICT_R_HEADERS              // Otherwise a PI macro is defined in R
#include "xtensor/xmath.hpp"          // xtensor import for the C++ universal functions
#include "xtensor-r/rarray.hpp"       // R bindings

#include <Rcpp.h>

using namespace Rcpp;

// [[Rcpp::plugins(cpp14)]]

// [[Rcpp::export]]
double sum_of_sines(xt::rarray<double>& m)
{
    auto sines = xt::sin(m);  // sines does not actually hold values.
    return std::accumulate(sines.cbegin(), sines.cend(), 0.0);
}
v <- matrix(0:14, nrow=3, ncol=5)
s <- sum_of_sines(v)
s

# prints 1.2853996391883833

Installation

Installation of the standalone C++ library

xtensor-r a header-only C++ library. It has been packaged for the mamba (or conda) package manager.

mamba install xtensor-r -c conda-forge

xtensor-r can be installed from source with cmake in any installation prefix. For example, on unix systems

cmake -D CMAKE_INSTALL_PREFIX=/prefix/path/ .
make
make install

Installation of the R package

We provide a R package for Xtensor on both conda and CRAN (Comprehensive R Archive Network). The packaging boilerplate for the R package is available at https://github.com/xtensor-stack/Xtensor.R.

To install the R package with conda:

conda install r-xtensor -c conda-forge

To install the R package from CRAN:

R CMD INSTALL xtensor

or from the GitHub repository using devtools

devtools::install_github("xtensor-stack/Xtensor.R")

The CRAN package vendors the headers for xtensor-r, xtensor, xtlandxsimd`.

Documentation

To get started with using xtensor-r, check out the full documentation

http://xtensor-r.readthedocs.io/

Dependencies on xtensor and Rcpp

xtensor-r depends on the xtensor and Rcpp libraries

xtensor-r xtensor Rcpp
master ^0.24.0 ^1.0
0.14.0 ^0.23.0 ^1.0
0.13.0 ^0.23.0 ^1.0
0.12.1 ^0.21.4 ^1.0
0.12.0 ^0.21.2 ^1.0
0.11.1 ^0.20.8 ^1.0
0.11.0 ^0.20.4 ^1.0
0.10.0 ^0.19.4 ^1.0
0.9.0 ^0.19.0 ^1.0
0.8.2 ^0.18.2 ^0.12.11
0.8.1 ^0.18.1 ^0.12.11
0.8.0 ^0.18.0 ^0.12.11
  • Core xtensor headers are vendored in the CRAN package.
  • When using the conda, or debian package managers, xtensor-r has a dependency on xtensor.

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].