---
title: "Discussion on \"Boost multiarray: a short cheat sheet\" | Hashnode"
description: "Discussion on \"Boost multiarray: a short cheat sheet\". Suppose you're writing some C++ code and you want a function to return a 2D array. How do you do it?\nThe answer is: don't do it. Instead, use boost's multiarray class (although xtensor looks interesting). \nTo make a 2D array in C++, with shape (NxM),..."
url: "https://hashnode.com/posts/boost-multiarray-a-short-cheat-sheet/638442486bcd4dabb1c84562"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Boost multiarray: a short cheat sheet](https://astro.hashnode.dev/boost-multiarray-a-short-cheat-sheet?utm_source=hashnode&utm_medium=feed)

Suppose you're writing some C++ code and you want a function to return a 2D array. How do you do it? The answer is: don't do it. Instead, use boost's multiarray class (although xtensor looks interesting). To make a 2D array in C++, with shape (NxM),...

Nov 28, 2022 · 2 min read · astro.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#boost](https://hashnode.com/tag/boost)

## Written by

[Danny Price](https://hashnode.com/@drdcp)

@drdcp

  
[View profile](https://hashnode.com/@drdcp)

Australian Project Scientist, Breakthrough Listen

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
