All Projects → xtensor-stack → zarray

xtensor-stack / zarray

Licence: BSD-3-Clause license
Dynamically typed N-D expression system based on xtensor

Programming Languages

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

Projects that are alternatives of or similar to zarray

Tensor
package tensor provides efficient and generic n-dimensional arrays in Go that are useful for machine learning and deep learning purposes
Stars: ✭ 222 (+865.22%)
Mutual labels:  multidimensional-arrays
Xtensor
C++ tensors with broadcasting and lazy computing
Stars: ✭ 2,453 (+10565.22%)
Mutual labels:  multidimensional-arrays
Mir Algorithm
Dlang Core Library
Stars: ✭ 143 (+521.74%)
Mutual labels:  multidimensional-arrays
Hptt
High-Performance Tensor Transpose library
Stars: ✭ 141 (+513.04%)
Mutual labels:  multidimensional-arrays
Array
C++ multidimensional arrays in the spirit of the STL
Stars: ✭ 123 (+434.78%)
Mutual labels:  multidimensional-arrays
Bqn
An APL-like programming language. Self-hosted!
Stars: ✭ 100 (+334.78%)
Mutual labels:  multidimensional-arrays
Pycuda
CUDA integration for Python, plus shiny features
Stars: ✭ 1,112 (+4734.78%)
Mutual labels:  multidimensional-arrays
Xyzpy
Efficiently generate and analyse high dimensional data.
Stars: ✭ 45 (+95.65%)
Mutual labels:  multidimensional-arrays
Xndarray
▦ Multidimensional arrays with semantics in JavaScript
Stars: ✭ 8 (-65.22%)
Mutual labels:  multidimensional-arrays
Arraymancer
A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends
Stars: ✭ 793 (+3347.83%)
Mutual labels:  multidimensional-arrays
Pyopencl
OpenCL integration for Python, plus shiny features
Stars: ✭ 790 (+3334.78%)
Mutual labels:  multidimensional-arrays
Loopy
A code generator for array-based code on CPUs and GPUs
Stars: ✭ 367 (+1495.65%)
Mutual labels:  multidimensional-arrays
Arrayy
🗃 Array manipulation library for PHP, called Arrayy!
Stars: ✭ 363 (+1478.26%)
Mutual labels:  multidimensional-arrays
Massiv
Efficient Haskell Arrays featuring Parallel computation
Stars: ✭ 328 (+1326.09%)
Mutual labels:  multidimensional-arrays
Fastor
A lightweight high performance tensor algebra framework for modern C++
Stars: ✭ 280 (+1117.39%)
Mutual labels:  multidimensional-arrays
ra-ra
A C++20 array / expression template library with some J/APL features
Stars: ✭ 22 (-4.35%)
Mutual labels:  multidimensional-arrays
tensority
Strongly typed multidimensional array library for OCaml
Stars: ✭ 44 (+91.3%)
Mutual labels:  multidimensional-arrays
xtensor-zarr
Implementation of the Zarr core protocol (version 2 and 3) based on xtensor.
Stars: ✭ 25 (+8.7%)
Mutual labels:  xtensor

Azure Pipelines Join the Gitter Chat

Dynamically typed N-D expression system based on xtensor.

Introduction

zarray is a dynamically typed N-D expression system built on top of xtensor.

Installation

Package managers

We provide a package for the mamba (or conda) package manager:

mamba install -c conda-forge zarray

Install from sources

zarray is a header-only library.

You can directly install it from the sources:

cmake -D CMAKE_INSTALL_PREFIX=your_install_prefix
make install

Dependencies

zarray depends on xtensor and nlohmann_json:

zarray xtensor nlohmann_json
master 0.23.8 3.2.0
0.1.0 0.23.8 3.2.0
0.0.6 0.23.8 3.2.0

Usage

Initialize a 2-D array and compute the sum of one of its rows and a 1-D array.

#include <zarray/zarray.hpp>

xt::zarray arr1 =
  {{1.0, 2.0, 3.0},
   {4.0, 5.0, 6.0},
   {7.0, 8.0, 9.0}};

xt::zarray arr2 =
  {5.0, 6.0, 7.0};

xt::zarray res = xt::strided_view(arr1, {1, xt::all()}) + arr2;
std::cout << res << std::endl;

Outputs:

{7, 11, 14}

Initialize a 1-D array and reshape it inplace.

#include <zarray/zarray.hpp>

xt::zarray arr =
  {1, 2, 3, 4, 5, 6, 7, 8, 9};

arr.reshape({3, 3});

std::cout << arr << std::endl;

Outputs:

{{1, 2, 3},
 {4, 5, 6},
 {7, 8, 9}}

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].