Skip to content

Commit 5b238d8

Browse files
committed
Added from_parts_with_err method to Array
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent d5cbbb7 commit 5b238d8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/array.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ impl<T> Array<T> {
8080
}
8181
}
8282

83+
/// Creates a new `Array` from its underlying components.
84+
///
85+
/// The data array should be provided in the higher-dimensional equivalent
86+
/// of row-major order.
87+
///
88+
/// # Error
89+
///
90+
/// Panics if the number of elements provided does not match the number of
91+
/// elements specified by the dimensions.
8392
pub fn from_parts_with_err(
8493
data: Vec<T>,
8594
dimensions: Vec<Dimension>,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy