Skip to content

Commit 29f64f8

Browse files
committed
Remove trailing whitespace
1 parent e3e9511 commit 29f64f8

File tree

18 files changed

+34
-34
lines changed

18 files changed

+34
-34
lines changed

blas-tests/tests/oper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ fn mat_mul() {
260260
}
261261

262262
// Check that matrix multiplication of contiguous matrices returns a
263-
// matrix with the same order
263+
// matrix with the same order
264264
#[test]
265265
fn mat_mul_order() {
266266
let (m, n, k) = (8, 8, 8);

examples/convo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SHARPEN: [[f32; 3]; 3] = [[0., -1., 0.], [ -1., 5., -1.], [0., -1., 0.]];
1414
type Kernel3x3<A> = [[A; 3]; 3];
1515

1616
#[inline(never)]
17-
fn conv_3x3<F>(a: &ArrayView2<F>, out: &mut ArrayViewMut2<F>, kernel: &Kernel3x3<F>)
17+
fn conv_3x3<F>(a: &ArrayView2<F>, out: &mut ArrayViewMut2<F>, kernel: &Kernel3x3<F>)
1818
where F: Float,
1919
{
2020
let (n, m) = a.dim();

examples/zip_many.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424

2525
azip!(mut a, b, c in { *a = b + c; });
2626
assert_eq!(a, &b + &c);
27-
27+
2828
// sum of each row
2929
let ax = Axis(0);
3030
let mut sums = Array::zeros(a.len_of(ax));

src/data_traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub unsafe trait Data : Sized {
3737
/// Array representation trait.
3838
///
3939
/// For an array with writable elements.
40-
///
40+
///
4141
/// ***Internal trait, see `Data`.***
4242
pub unsafe trait DataMut : Data {
4343
#[doc(hidden)]

src/dimension/conversion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ macro_rules! tuple_to_array {
110110
index!(tuple_expr [self] $n)
111111
}
112112
}
113-
113+
114114
impl IntoDimension for [Ix; $n] {
115115
type Dim = Dim<[Ix; $n]>;
116116
#[inline(always)]

src/dimension/dimension_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl Dimension for Dim<[Ix; 2]> {
582582
Axis(1)
583583
}
584584
}
585-
585+
586586
#[inline]
587587
fn first_index(&self) -> Option<Self> {
588588
let m = get!(self, 0);

src/dimension/ndindex.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ unsafe impl NdIndex<Ix2> for (Ix, Ix) {
5757
}
5858
#[inline]
5959
fn index_unchecked(&self, strides: &Ix2) -> isize {
60-
stride_offset(self.0, get!(strides, 0)) +
60+
stride_offset(self.0, get!(strides, 0)) +
6161
stride_offset(self.1, get!(strides, 1))
6262
}
6363
}
@@ -69,7 +69,7 @@ unsafe impl NdIndex<Ix3> for (Ix, Ix, Ix) {
6969

7070
#[inline]
7171
fn index_unchecked(&self, strides: &Ix3) -> isize {
72-
stride_offset(self.0, get!(strides, 0)) +
72+
stride_offset(self.0, get!(strides, 0)) +
7373
stride_offset(self.1, get!(strides, 1)) +
7474
stride_offset(self.2, get!(strides, 2))
7575
}
@@ -133,7 +133,7 @@ macro_rules! ndindex_with_array {
133133
#[inline]
134134
fn index_unchecked(&self, _strides: &$ix_n) -> isize {
135135
$(
136-
stride_offset(self[$index], get!(_strides, $index)) +
136+
stride_offset(self[$index], get!(_strides, $index)) +
137137
)*
138138
0
139139
}
@@ -155,7 +155,7 @@ macro_rules! ndindex_with_array {
155155
"Attempted to index with {:?} in array with {} axes",
156156
self, strides.ndim());
157157
$(
158-
stride_offset(get!(self, $index), get!(strides, $index)) +
158+
stride_offset(get!(self, $index), get!(strides, $index)) +
159159
)*
160160
0
161161
}
@@ -177,7 +177,7 @@ macro_rules! ndindex_with_array {
177177
"Attempted to index with {:?} in array with {} axes",
178178
self, strides.ndim());
179179
$(
180-
stride_offset(self[$index], get!(strides, $index)) +
180+
stride_offset(self[$index], get!(strides, $index)) +
181181
)*
182182
0
183183
}

src/impl_methods.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
892892
/// **Panics** if any dimension of `chunk_size` is zero<br>
893893
/// (**Panics** if `D` is `IxDyn` and `chunk_size` does not match the
894894
/// number of array axes.)
895-
pub fn exact_chunks<E>(&self, chunk_size: E) -> ExactChunks<A, D>
895+
pub fn exact_chunks<E>(&self, chunk_size: E) -> ExactChunks<A, D>
896896
where E: IntoDimension<Dim=D>,
897897
{
898898
exact_chunks_of(self.view(), chunk_size)
@@ -930,7 +930,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
930930
/// [6, 6, 7, 7, 8, 8, 0],
931931
/// [6, 6, 7, 7, 8, 8, 0]]));
932932
/// ```
933-
pub fn exact_chunks_mut<E>(&mut self, chunk_size: E) -> ExactChunksMut<A, D>
933+
pub fn exact_chunks_mut<E>(&mut self, chunk_size: E) -> ExactChunksMut<A, D>
934934
where E: IntoDimension<Dim=D>,
935935
S: DataMut
936936
{
@@ -941,13 +941,13 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
941941
///
942942
/// The windows are all distinct overlapping views of size `window_size`
943943
/// that fit into the array's shape.
944-
///
944+
///
945945
/// Will yield over no elements if window size is larger
946946
/// than the actual array size of any dimension.
947947
///
948948
/// The produced element is an `ArrayView<A, D>` with exactly the dimension
949949
/// `window_size`.
950-
///
950+
///
951951
/// **Panics** if any dimension of `window_size` is zero.<br>
952952
/// (**Panics** if `D` is `IxDyn` and `window_size` does not match the
953953
/// number of array axes.)

src/indexes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<D: Dimension + Copy> NdProducer for Indices<D> {
178178

179179
#[inline(always)]
180180
fn contiguous_stride(&self) -> Self::Stride { 0 }
181-
181+
182182
#[doc(hidden)]
183183
fn split_at(self, axis: Axis, index: usize) -> (Self, Self) {
184184
let start_a = self.start;

src/iterators/macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macro_rules! impl_ndproducer {
3636
unsafe fn item(&$self_:ident, $ptr:pat) {
3737
$refexpr:expr
3838
}
39-
}) => {
39+
}) => {
4040
impl<$($typarm)*> NdProducer for $fulltype {
4141
$(
4242
type $atyn = $atyv;
@@ -98,7 +98,7 @@ impl<$($typarm)*> NdProducer for $fulltype {
9898
private_impl!{}
9999
}
100100

101-
expand_if!(@nonempty [$($cloneparm)*]
101+
expand_if!(@nonempty [$($cloneparm)*]
102102
impl<$($cloneparm)*> Clone for $fulltype {
103103
fn clone(&self) -> Self {
104104
$typename {
@@ -130,8 +130,8 @@ macro_rules! impl_iterator {
130130
fn item(&mut $self_:ident, $elt:pat) {
131131
$refexpr:expr
132132
}
133-
}) => {
134-
expand_if!(@nonempty [$($cloneparm)*]
133+
}) => {
134+
expand_if!(@nonempty [$($cloneparm)*]
135135

136136
impl<$($cloneparm)*> Clone for $fulltype {
137137
fn clone(&self) -> Self {

src/iterators/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ macro_rules! outer_iter_split_at_impl {
718718
{
719719
assert!(index <= self.iter.len);
720720
let right_ptr = if index != self.iter.len {
721-
unsafe { self.iter.offset(index) }
721+
unsafe { self.iter.offset(index) }
722722
}
723723
else {
724724
self.iter.ptr

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ pub type Ixs = isize;
340340
/// A *column major* (a.k.a. “f” or fortran) memory order array has
341341
/// columns (or, in general, the outermost axis) with contiguous elements.
342342
///
343-
/// The logical order of any array’s elements is the row major order
343+
/// The logical order of any array’s elements is the row major order
344344
/// (the rightmost index is varying the fastest).
345345
/// The iterators `.iter(), .iter_mut()` always adhere to this order, for example.
346346
///
@@ -367,7 +367,7 @@ pub type Ixs = isize;
367367
///
368368
/// These are the element iterators of arrays and they produce an element
369369
/// sequence in the logical order of the array, that means that the elements
370-
/// will be visited in the sequence that corresponds to increasing the
370+
/// will be visited in the sequence that corresponds to increasing the
371371
/// last index first: *0, ..., 0, 0*; *0, ..., 0, 1*; *0, ...0, 2* and so on.
372372
///
373373
/// ### `.outer_iter()` and `.axis_iter()`
@@ -684,7 +684,7 @@ pub type RcArray<A, D> = ArrayBase<OwnedRcRepr<A>, D>;
684684
/// `Sync` (when allowed by the element type of the array too).
685685
///
686686
/// [**`ArrayBase`**](struct.ArrayBase.html) is used to implement both the owned
687-
/// arrays and the views; see its docs for an overview of all array features.
687+
/// arrays and the views; see its docs for an overview of all array features.
688688
///
689689
/// See also:
690690
///
@@ -701,7 +701,7 @@ pub type ArcArray<A, D> = ArrayBase<OwnedArcRepr<A>, D>;
701701
/// the dimensionality.
702702
///
703703
/// [**`ArrayBase`**](struct.ArrayBase.html) is used to implement both the owned
704-
/// arrays and the views; see its docs for an overview of all array features.
704+
/// arrays and the views; see its docs for an overview of all array features.
705705
///
706706
/// See also:
707707
///

src/linalg/impl_linalg.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,29 +755,29 @@ mod blas_tests {
755755
assert!(blas_row_major_2d::<f32, _>(&m));
756756
assert!(!blas_column_major_2d::<f32, _>(&m));
757757
}
758-
758+
759759
#[test]
760760
fn blas_row_major_2d_row_matrix() {
761761
let m: Array2<f32> = Array2::zeros((1, 5));
762762
assert!(blas_row_major_2d::<f32, _>(&m));
763763
assert!(blas_column_major_2d::<f32, _>(&m));
764764
}
765-
765+
766766
#[test]
767767
fn blas_row_major_2d_column_matrix() {
768768
let m: Array2<f32> = Array2::zeros((5, 1));
769769
assert!(blas_row_major_2d::<f32, _>(&m));
770770
assert!(blas_column_major_2d::<f32, _>(&m));
771771
}
772-
772+
773773
#[test]
774774
fn blas_row_major_2d_transposed_row_matrix() {
775775
let m: Array2<f32> = Array2::zeros((1, 5));
776776
let m_t = m.t();
777777
assert!(blas_row_major_2d::<f32, _>(&m_t));
778778
assert!(blas_column_major_2d::<f32, _>(&m_t));
779779
}
780-
780+
781781
#[test]
782782
fn blas_row_major_2d_transposed_column_matrix() {
783783
let m: Array2<f32> = Array2::zeros((5, 1));

src/zip/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl<'a, A, D: Dimension> NdProducer for ArrayView<'a, A, D>
319319

320320
#[inline(always)]
321321
fn contiguous_stride(&self) -> Self::Stride { 1 }
322-
322+
323323
#[doc(hidden)]
324324
fn split_at(self, axis: Axis, index: usize) -> (Self, Self) {
325325
self.split_at(axis, index)

tests/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn formatting()
1717
"[[[ 1]],\n [[ 2]],\n [[ 3]],\n [[ 4]]]");
1818

1919
let a = a.reshape((2, 2));
20-
assert_eq!(format!("{}", a),
20+
assert_eq!(format!("{}", a),
2121
"[[1, 2],\n [3, 4]]");
2222
assert_eq!(format!("{}", a),
2323
"[[1, 2],\n [3, 4]]");

tests/into-ixdyn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ fn test_arr0_into_dyn() {
1111
fn test_arr2_into_arrd_nonstandard_strides() {
1212
let arr = Array2::from_shape_fn((12, 34).f(), |(i, j)| i * 34 + j).into_dyn();
1313
let brr = ArrayD::from_shape_fn(vec![12, 34], |d| d[0] * 34 + d[1]);
14-
14+
1515
assert!(arr == brr);
1616
}

tests/oper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ fn mat_mul() {
405405
}
406406

407407
// Check that matrix multiplication of contiguous matrices returns a
408-
// matrix with the same order
408+
// matrix with the same order
409409
#[test]
410410
fn mat_mul_order() {
411411
let (m, n, k) = (8, 8, 8);

tests/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use ndarray::prelude::*;
77
use ndarray::Zip;
88

99
// Edge Cases for Windows iterator:
10-
//
10+
//
1111
// - window size is 0
1212
// - what is the behaviour of the standard for this situation?
1313
// "Panics if size is 0."

0 commit comments

Comments
 (0)