Skip to content

Commit a7d1fd6

Browse files
authored
Fix some typos (#1134)
1 parent 6c8b821 commit a7d1fd6

13 files changed

+23
-23
lines changed

RELEASES.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ API changes
366366
-----------
367367

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

372372
https://github.com/rust-ndarray/ndarray/pull/921
@@ -545,7 +545,7 @@ New features
545545
Enhancements
546546
------------
547547

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

@@ -978,7 +978,7 @@ Earlier releases
978978

979979
- Add `Zip::indexed`
980980
- New methods `genrows/_mut, gencolumns/_mut, lanes/_mut` that
981-
return iterable producers (producer means `Zip` compatibile).
981+
return iterable producers (producer means `Zip` compatible).
982982
- New method `.windows()` by @Robbepop, returns an iterable producer
983983
- New function `general_mat_vec_mul` (with fast default and blas acceleration)
984984
- `Zip::apply` and `fold_while` now take `self` as the first argument

examples/axis_ops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use ndarray::prelude::*;
1111
/// make sure axes are in positive stride direction, and merge adjacent
1212
/// axes if possible.
1313
///
14-
/// This changes the logical order of the elments in the
14+
/// This changes the logical order of the elements in the
1515
/// array, so that if we read them in row-major order after regularization,
1616
/// it corresponds to their order in memory.
1717
///

src/arraytraits.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ where
303303
pub const ARRAY_FORMAT_VERSION: u8 = 1u8;
304304

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

362-
/// Implementation of `ArrayViewMut::from(&mut S)` where `S` is a slice or slicable.
362+
/// Implementation of `ArrayViewMut::from(&mut S)` where `S` is a slice or sliceable.
363363
impl<'a, A, Slice: ?Sized> From<&'a mut Slice> for ArrayViewMut<'a, A, Ix1>
364364
where
365365
Slice: AsMut<[A]>,

src/impl_1d.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ where
4242
let mut dst = if let Some(dst) = lane_iter.next() { dst } else { return };
4343

4444
// Logically we do a circular swap here, all elements in a chain
45-
// Using MaybeUninit to avoid unecessary writes in the safe swap solution
45+
// Using MaybeUninit to avoid unnecessary writes in the safe swap solution
4646
//
4747
// for elt in lane_iter {
4848
// std::mem::swap(dst, elt);

src/impl_2d.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ where
125125
/// Return true if the array is square, false otherwise.
126126
///
127127
/// # Examples
128-
/// Sqaure:
128+
/// Square:
129129
/// ```
130130
/// use ndarray::array;
131131
/// let array = array![[1., 2.], [3., 4.]];
132132
/// assert!(array.is_square());
133133
/// ```
134-
/// Not sqaure:
134+
/// Not square:
135135
/// ```
136136
/// use ndarray::array;
137137
/// let array = array![[1., 2., 5.], [3., 4., 6.]];

src/impl_constructors.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ where
540540
}
541541

542542

543-
/// Create an array with uninitalized elements, shape `shape`.
543+
/// Create an array with uninitialized elements, shape `shape`.
544544
///
545545
/// The uninitialized elements of type `A` are represented by the type `MaybeUninit<A>`,
546546
/// an easier way to handle uninit values correctly.
@@ -598,7 +598,7 @@ where
598598
}
599599
}
600600

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

635635
#[deprecated(note = "This method is hard to use correctly. Use `uninit` instead.",
636636
since = "0.15.0")]
637-
/// Create an array with uninitalized elements, shape `shape`.
637+
/// Create an array with uninitialized elements, shape `shape`.
638638
///
639639
/// Prefer to use [`uninit()`](ArrayBase::uninit) if possible, because it is
640640
/// easier to use correctly.
@@ -643,7 +643,7 @@ where
643643
///
644644
/// ### Safety
645645
///
646-
/// Accessing uninitalized values is undefined behaviour. You must overwrite *all* the elements
646+
/// Accessing uninitialized values is undefined behaviour. You must overwrite *all* the elements
647647
/// in the array after it is created; for example using
648648
/// [`raw_view_mut`](ArrayBase::raw_view_mut) or other low-level element access.
649649
///
@@ -676,7 +676,7 @@ where
676676
S: DataOwned<Elem = MaybeUninit<A>>,
677677
D: Dimension,
678678
{
679-
/// Create an array with uninitalized elements, shape `shape`.
679+
/// Create an array with uninitialized elements, shape `shape`.
680680
///
681681
/// This method has been renamed to `uninit`
682682
#[deprecated(note = "Renamed to `uninit`", since = "0.15.0")]

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ pub type Ixs = isize;
710710
/// The trait [`ScalarOperand`] marks types that can be used in arithmetic
711711
/// with arrays directly. For a scalar `K` the following combinations of operands
712712
/// are supported (scalar can be on either the left or right side, but
713-
/// `ScalarOperand` docs has the detailed condtions).
713+
/// `ScalarOperand` docs has the detailed conditions).
714714
///
715715
/// - `&A @ K` or `K @ &A` which produces a new `Array`
716716
/// - `B @ K` or `K @ B` which consumes `B`, updates it with the result and returns it

src/linalg/impl_linalg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ pub fn general_mat_vec_mul<A, S1, S2, S3>(
677677

678678
/// General matrix-vector multiplication
679679
///
680-
/// Use a raw view for the destination vector, so that it can be uninitalized.
680+
/// Use a raw view for the destination vector, so that it can be uninitialized.
681681
///
682682
/// ## Safety
683683
///

src/parallel/impl_par_methods.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ macro_rules! zip_impl {
9494
-> Array<R, D>
9595
where R: Send
9696
{
97-
let mut output = self.uninitalized_for_current_layout::<R>();
97+
let mut output = self.uninitialized_for_current_layout::<R>();
9898
let total_len = output.len();
9999

100100
// Create a parallel iterator that produces chunks of the zip with the output
@@ -191,7 +191,7 @@ macro_rules! zip_impl {
191191
/// Note that it is often more efficient to parallelize not per-element but rather
192192
/// based on larger chunks of an array like generalized rows and operating on each chunk
193193
/// using a sequential variant of the accumulation.
194-
/// For example, sum each row sequentially and in parallel, taking advatange of locality
194+
/// For example, sum each row sequentially and in parallel, taking advantage of locality
195195
/// and vectorization within each task, and then reduce their sums to the sum of the matrix.
196196
///
197197
/// Also note that the splitting of the producer into multiple tasks is _not_ deterministic

src/zip/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ where
426426
}
427427

428428
#[cfg(feature = "rayon")]
429-
pub(crate) fn uninitalized_for_current_layout<T>(&self) -> Array<MaybeUninit<T>, D>
429+
pub(crate) fn uninitialized_for_current_layout<T>(&self) -> Array<MaybeUninit<T>, D>
430430
{
431431
let is_f = self.prefer_f();
432432
Array::uninit(self.dimension.clone().set_f(is_f))

src/zip/ndproducer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ where
4343
/// Most `NdProducers` are *iterable* (implement `IntoIterator`) but not directly
4444
/// iterators. This separation is needed because the producer represents
4545
/// a multidimensional set of items, it can be split along a particular axis for
46-
/// parallelization, and it has no fixed correspondance to a sequence.
46+
/// parallelization, and it has no fixed correspondence to a sequence.
4747
///
4848
/// The natural exception is one dimensional producers, like `AxisIter`, which
4949
/// implement `Iterator` directly

tests/iterators.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ fn axis_iter_mut_zip_partially_consumed_discontiguous() {
532532
fn axis_chunks_iter_corner_cases() {
533533
// examples provided by @bluss in PR #65
534534
// these tests highlight corner cases of the axis_chunks_iter implementation
535-
// and enable checking if no pointer offseting is out of bounds. However
536-
// checking the absence of of out of bounds offseting cannot (?) be
535+
// and enable checking if no pointer offsetting is out of bounds. However
536+
// checking the absence of of out of bounds offsetting cannot (?) be
537537
// done automatically, so one has to launch this test in a debugger.
538538
let a = ArcArray::<f32, _>::linspace(0., 7., 8).reshape((8, 1));
539539
let it = a.axis_chunks_iter(Axis(0), 4);

tests/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn test_window_zip() {
116116
}
117117
}
118118

119-
/// Test verifies that non existant Axis results in panic
119+
/// Test verifies that non existent Axis results in panic
120120
#[test]
121121
#[should_panic]
122122
fn axis_windows_outofbound() {

0 commit comments

Comments
 (0)