<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An array that owns its data uniquely."><meta name="keywords" content="rust, rustlang, rust-lang, Array"><title>Array in ndarray - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../ndarray/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition Array</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.into_raw_vec">into_raw_vec</a></div></div><h2 class="location">Other items in<br><a href="index.html">ndarray</a></h2><div id="sidebar-vars" data-name="Array" data-ty="type" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Type Definition <a href="index.html">ndarray</a>::<wbr><a class="type" href="#">Array</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/ndarray/lib.rs.html#649" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type Array<A, D> = <a class="struct" href="struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a><<a class="struct" href="struct.OwnedRepr.html" title="struct ndarray::OwnedRepr">OwnedRepr</a><A>, D>;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An array that owns its data uniquely.</p>
<p><code>Array</code> is the main n-dimensional array type, and it owns all its array
elements.</p>
<p>The <code>Array<A, D></code> is parameterized by <code>A</code> for the element type and <code>D</code> for
the dimensionality.</p>
<p><a href="struct.ArrayBase.html"><strong><code>ArrayBase</code></strong></a> is used to implement both the owned
arrays and the views; see its docs for an overview of all array features.</p>
<p>See also:</p>
<ul>
<li><a href="struct.ArrayBase.html#constructor-methods-for-owned-arrays">Constructor Methods for Owned Arrays</a></li>
<li><a href="struct.ArrayBase.html#methods-for-all-array-types">Methods For All Array Types</a></li>
<li>Dimensionality-specific type alises
<a href="Array1.t.html"><code>Array1</code></a>,
<a href="Array2.t.html"><code>Array2</code></a>,
<a href="Array3.t.html"><code>Array3</code></a>, …,
<a href="ArrayD.t.html"><code>ArrayD</code></a>,
and so on.</li>
</ul>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<A, D> <a class="type" href="type.Array.html" title="type ndarray::Array">Array</a><A, D> <span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Dimension.html" title="trait ndarray::Dimension">Dimension</a>, </span></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/ndarray/impl_owned_array.rs.html#8-19" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Methods specific to <code>Array</code>.</p>
<p><em><strong>See also all methods for <a href="struct.ArrayBase.html"><code>ArrayBase</code></a></strong></em></p>
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_raw_vec" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.into_raw_vec" class="fnname">into_raw_vec</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><A></h4><a href="#method.into_raw_vec" class="anchor"></a><a class="srclink" href="../src/ndarray/impl_owned_array.rs.html#16-18" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a vector of the elements in the array, in the way they are
stored internally.</p>
<p>If the array is in standard memory layout, the logical element order
of the array (<code>.iter()</code> order) and of the returned vector will be the same.</p>
</div></details></div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="ndarray" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>