Skip to content

Commit e064200

Browse files
committed
DOC: In Docs and signatures, change RcArray to ArcArray
These are equivalent type aliases, but the former will be deprecated. Also, while ArcArray is not in the prelude, have it in the imp_prelude.
1 parent c2bc792 commit e064200

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

src/free_functions.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use imp_prelude::*;
3636
/// This macro uses `vec![]`, and has the same ownership semantics;
3737
/// elements are moved into the resulting `Array`.
3838
///
39-
/// Use `array![...].into_shared()` to create an `RcArray`.
39+
/// Use `array![...].into_shared()` to create an `ArcArray`.
4040
#[macro_export]
4141
macro_rules! array {
4242
($([$([$($x:expr),* $(,)*]),+ $(,)*]),+ $(,)*) => {{
@@ -62,7 +62,7 @@ pub fn arr1<A: Clone>(xs: &[A]) -> Array1<A> {
6262
}
6363

6464
/// Create a one-dimensional array with elements from `xs`.
65-
pub fn rcarr1<A: Clone>(xs: &[A]) -> RcArray<A, Ix1> {
65+
pub fn rcarr1<A: Clone>(xs: &[A]) -> ArcArray<A, Ix1> {
6666
arr1(xs).into_shared()
6767
}
6868

@@ -256,7 +256,7 @@ impl<A, V, U> From<Vec<V>> for Array3<A>
256256

257257
/// Create a two-dimensional array with elements from `xs`.
258258
///
259-
pub fn rcarr2<A: Clone, V: Clone + FixedInitializer<Elem = A>>(xs: &[V]) -> RcArray<A, Ix2> {
259+
pub fn rcarr2<A: Clone, V: Clone + FixedInitializer<Elem = A>>(xs: &[V]) -> ArcArray<A, Ix2> {
260260
arr2(xs).into_shared()
261261
}
262262

@@ -287,7 +287,7 @@ pub fn arr3<A: Clone, V: FixedInitializer<Elem=U>, U: FixedInitializer<Elem=A>>(
287287

288288
/// Create a three-dimensional array with elements from `xs`.
289289
pub fn rcarr3<A: Clone, V: FixedInitializer<Elem=U>, U: FixedInitializer<Elem=A>>(xs: &[V])
290-
-> RcArray<A, Ix3>
290+
-> ArcArray<A, Ix3>
291291
where V: Clone, U: Clone,
292292
{
293293
arr3(xs).into_shared()

src/impl_constructors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use iterators::{to_vec, to_vec_mapped};
2323

2424
/// # Constructor Methods for Owned Arrays
2525
///
26-
/// Note that the constructor methods apply to `Array` and `RcArray`,
26+
/// Note that the constructor methods apply to `Array` and `ArcArray`,
2727
/// the two array types that have owned storage.
2828
///
2929
/// ## Constructor methods for one-dimensional arrays.

src/impl_methods.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
161161
}
162162

163163
/// Return a shared ownership (copy on write) array.
164-
pub fn to_shared(&self) -> RcArray<A, D>
164+
pub fn to_shared(&self) -> ArcArray<A, D>
165165
where A: Clone
166166
{
167-
// FIXME: Avoid copying if it’s already an RcArray.
167+
// FIXME: Avoid copying if it’s already an ArcArray.
168168
self.to_owned().into_shared()
169169
}
170170

@@ -178,7 +178,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
178178

179179
/// Turn the array into a shared ownership (copy on write) array,
180180
/// without any copying.
181-
pub fn into_shared(self) -> RcArray<A, D>
181+
pub fn into_shared(self) -> ArcArray<A, D>
182182
where S: DataOwned,
183183
{
184184
let data = self.data.into_shared();
@@ -487,7 +487,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
487487
/// Return a mutable reference to the element at `index`.
488488
///
489489
/// **Note:** Only unchecked for non-debug builds of ndarray.<br>
490-
/// **Note:** (For `RcArray`) The array must be uniquely held when mutating it.
490+
/// **Note:** (For `ArcArray`) The array must be uniquely held when mutating it.
491491
#[inline]
492492
pub unsafe fn uget_mut<I>(&mut self, index: I) -> &mut A
493493
where S: DataMut,
@@ -520,7 +520,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
520520
/// Indices may be equal.
521521
///
522522
/// **Note:** only unchecked for non-debug builds of ndarray.<br>
523-
/// **Note:** (For `RcArray`) The array must be uniquely held.
523+
/// **Note:** (For `ArcArray`) The array must be uniquely held.
524524
pub unsafe fn uswap<I>(&mut self, index1: I, index2: I)
525525
where S: DataMut,
526526
I: NdIndex<D>,
@@ -1173,7 +1173,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
11731173
}
11741174
}
11751175

1176-
/// *Note: Reshape is for `RcArray` only. Use `.into_shape()` for
1176+
/// *Note: Reshape is for `ArcArray` only. Use `.into_shape()` for
11771177
/// other arrays and array views.*
11781178
///
11791179
/// Transform the array into `shape`; any shape with the same number of

src/impl_ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ macro_rules! impl_binary_op(
5555
/// between `self` and `rhs`,
5656
/// and return the result (based on `self`).
5757
///
58-
/// `self` must be an `Array` or `RcArray`.
58+
/// `self` must be an `Array` or `ArcArray`.
5959
///
6060
/// If their shapes disagree, `rhs` is broadcast to the shape of `self`.
6161
///
@@ -126,7 +126,7 @@ impl<'a, A, S, S2, D, E> $trt<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D>
126126
/// between `self` and the scalar `x`,
127127
/// and return the result (based on `self`).
128128
///
129-
/// `self` must be an `Array` or `RcArray`.
129+
/// `self` must be an `Array` or `ArcArray`.
130130
impl<A, S, D, B> $trt<B> for ArrayBase<S, D>
131131
where A: Clone + $trt<B, Output=A>,
132132
S: DataOwned<Elem=A> + DataMut,

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ pub use layout::Layout;
186186
/// Implementation's prelude. Common types used everywhere.
187187
mod imp_prelude {
188188
pub use prelude::*;
189+
pub use ArcArray;
189190
pub use {
190191
RemoveAxis,
191192
Data,

0 commit comments

Comments
 (0)