Skip to content

Commit

Permalink
Fix some typos (#1134)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn authored Dec 20, 2021
1 parent 6c8b821 commit a7d1fd6
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ API changes
-----------

- New constructors `Array::from_iter` and `Array::from_vec` by [@bluss].
No new functionality, just that these constructors are avaiable without trait
No new functionality, just that these constructors are available without trait
imports.

https://github.com/rust-ndarray/ndarray/pull/921
Expand Down Expand Up @@ -545,7 +545,7 @@ New features
Enhancements
------------

- Handle inhomogenous shape inputs better in Zip, in practice: guess better whether
- Handle inhomogeneous shape inputs better in Zip, in practice: guess better whether
to prefer c- or f-order for the inner loop by [@bluss]
https://github.com/rust-ndarray/ndarray/pull/809

Expand Down Expand Up @@ -978,7 +978,7 @@ Earlier releases

- Add `Zip::indexed`
- New methods `genrows/_mut, gencolumns/_mut, lanes/_mut` that
return iterable producers (producer means `Zip` compatibile).
return iterable producers (producer means `Zip` compatible).
- New method `.windows()` by @Robbepop, returns an iterable producer
- New function `general_mat_vec_mul` (with fast default and blas acceleration)
- `Zip::apply` and `fold_while` now take `self` as the first argument
Expand Down
2 changes: 1 addition & 1 deletion examples/axis_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ndarray::prelude::*;
/// make sure axes are in positive stride direction, and merge adjacent
/// axes if possible.
///
/// This changes the logical order of the elments in the
/// This changes the logical order of the elements in the
/// array, so that if we read them in row-major order after regularization,
/// it corresponds to their order in memory.
///
Expand Down
4 changes: 2 additions & 2 deletions src/arraytraits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ where
pub const ARRAY_FORMAT_VERSION: u8 = 1u8;

// use "raw" form instead of type aliases here so that they show up in docs
/// Implementation of `ArrayView::from(&S)` where `S` is a slice or slicable.
/// Implementation of `ArrayView::from(&S)` where `S` is a slice or sliceable.
impl<'a, A, Slice: ?Sized> From<&'a Slice> for ArrayView<'a, A, Ix1>
where
Slice: AsRef<[A]>,
Expand Down Expand Up @@ -359,7 +359,7 @@ where
}
}

/// Implementation of `ArrayViewMut::from(&mut S)` where `S` is a slice or slicable.
/// Implementation of `ArrayViewMut::from(&mut S)` where `S` is a slice or sliceable.
impl<'a, A, Slice: ?Sized> From<&'a mut Slice> for ArrayViewMut<'a, A, Ix1>
where
Slice: AsMut<[A]>,
Expand Down
2 changes: 1 addition & 1 deletion src/impl_1d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ where
let mut dst = if let Some(dst) = lane_iter.next() { dst } else { return };

// Logically we do a circular swap here, all elements in a chain
// Using MaybeUninit to avoid unecessary writes in the safe swap solution
// Using MaybeUninit to avoid unnecessary writes in the safe swap solution
//
// for elt in lane_iter {
// std::mem::swap(dst, elt);
Expand Down
4 changes: 2 additions & 2 deletions src/impl_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ where
/// Return true if the array is square, false otherwise.
///
/// # Examples
/// Sqaure:
/// Square:
/// ```
/// use ndarray::array;
/// let array = array![[1., 2.], [3., 4.]];
/// assert!(array.is_square());
/// ```
/// Not sqaure:
/// Not square:
/// ```
/// use ndarray::array;
/// let array = array![[1., 2., 5.], [3., 4., 6.]];
Expand Down
10 changes: 5 additions & 5 deletions src/impl_constructors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ where
}


/// Create an array with uninitalized elements, shape `shape`.
/// Create an array with uninitialized elements, shape `shape`.
///
/// The uninitialized elements of type `A` are represented by the type `MaybeUninit<A>`,
/// an easier way to handle uninit values correctly.
Expand Down Expand Up @@ -598,7 +598,7 @@ where
}
}

/// Create an array with uninitalized elements, shape `shape`.
/// Create an array with uninitialized elements, shape `shape`.
///
/// The uninitialized elements of type `A` are represented by the type `MaybeUninit<A>`,
/// an easier way to handle uninit values correctly.
Expand Down Expand Up @@ -634,7 +634,7 @@ where

#[deprecated(note = "This method is hard to use correctly. Use `uninit` instead.",
since = "0.15.0")]
/// Create an array with uninitalized elements, shape `shape`.
/// Create an array with uninitialized elements, shape `shape`.
///
/// Prefer to use [`uninit()`](ArrayBase::uninit) if possible, because it is
/// easier to use correctly.
Expand All @@ -643,7 +643,7 @@ where
///
/// ### Safety
///
/// Accessing uninitalized values is undefined behaviour. You must overwrite *all* the elements
/// Accessing uninitialized values is undefined behaviour. You must overwrite *all* the elements
/// in the array after it is created; for example using
/// [`raw_view_mut`](ArrayBase::raw_view_mut) or other low-level element access.
///
Expand Down Expand Up @@ -676,7 +676,7 @@ where
S: DataOwned<Elem = MaybeUninit<A>>,
D: Dimension,
{
/// Create an array with uninitalized elements, shape `shape`.
/// Create an array with uninitialized elements, shape `shape`.
///
/// This method has been renamed to `uninit`
#[deprecated(note = "Renamed to `uninit`", since = "0.15.0")]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ pub type Ixs = isize;
/// The trait [`ScalarOperand`] marks types that can be used in arithmetic
/// with arrays directly. For a scalar `K` the following combinations of operands
/// are supported (scalar can be on either the left or right side, but
/// `ScalarOperand` docs has the detailed condtions).
/// `ScalarOperand` docs has the detailed conditions).
///
/// - `&A @ K` or `K @ &A` which produces a new `Array`
/// - `B @ K` or `K @ B` which consumes `B`, updates it with the result and returns it
Expand Down
2 changes: 1 addition & 1 deletion src/linalg/impl_linalg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ pub fn general_mat_vec_mul<A, S1, S2, S3>(

/// General matrix-vector multiplication
///
/// Use a raw view for the destination vector, so that it can be uninitalized.
/// Use a raw view for the destination vector, so that it can be uninitialized.
///
/// ## Safety
///
Expand Down
4 changes: 2 additions & 2 deletions src/parallel/impl_par_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ macro_rules! zip_impl {
-> Array<R, D>
where R: Send
{
let mut output = self.uninitalized_for_current_layout::<R>();
let mut output = self.uninitialized_for_current_layout::<R>();
let total_len = output.len();

// Create a parallel iterator that produces chunks of the zip with the output
Expand Down Expand Up @@ -191,7 +191,7 @@ macro_rules! zip_impl {
/// Note that it is often more efficient to parallelize not per-element but rather
/// based on larger chunks of an array like generalized rows and operating on each chunk
/// using a sequential variant of the accumulation.
/// For example, sum each row sequentially and in parallel, taking advatange of locality
/// For example, sum each row sequentially and in parallel, taking advantage of locality
/// and vectorization within each task, and then reduce their sums to the sum of the matrix.
///
/// Also note that the splitting of the producer into multiple tasks is _not_ deterministic
Expand Down
2 changes: 1 addition & 1 deletion src/zip/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ where
}

#[cfg(feature = "rayon")]
pub(crate) fn uninitalized_for_current_layout<T>(&self) -> Array<MaybeUninit<T>, D>
pub(crate) fn uninitialized_for_current_layout<T>(&self) -> Array<MaybeUninit<T>, D>
{
let is_f = self.prefer_f();
Array::uninit(self.dimension.clone().set_f(is_f))
Expand Down
2 changes: 1 addition & 1 deletion src/zip/ndproducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ where
/// Most `NdProducers` are *iterable* (implement `IntoIterator`) but not directly
/// iterators. This separation is needed because the producer represents
/// a multidimensional set of items, it can be split along a particular axis for
/// parallelization, and it has no fixed correspondance to a sequence.
/// parallelization, and it has no fixed correspondence to a sequence.
///
/// The natural exception is one dimensional producers, like `AxisIter`, which
/// implement `Iterator` directly
Expand Down
4 changes: 2 additions & 2 deletions tests/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ fn axis_iter_mut_zip_partially_consumed_discontiguous() {
fn axis_chunks_iter_corner_cases() {
// examples provided by @bluss in PR #65
// these tests highlight corner cases of the axis_chunks_iter implementation
// and enable checking if no pointer offseting is out of bounds. However
// checking the absence of of out of bounds offseting cannot (?) be
// and enable checking if no pointer offsetting is out of bounds. However
// checking the absence of of out of bounds offsetting cannot (?) be
// done automatically, so one has to launch this test in a debugger.
let a = ArcArray::<f32, _>::linspace(0., 7., 8).reshape((8, 1));
let it = a.axis_chunks_iter(Axis(0), 4);
Expand Down
2 changes: 1 addition & 1 deletion tests/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn test_window_zip() {
}
}

/// Test verifies that non existant Axis results in panic
/// Test verifies that non existent Axis results in panic
#[test]
#[should_panic]
fn axis_windows_outofbound() {
Expand Down

0 comments on commit a7d1fd6

Please sign in to comment.