File tree 4 files changed +66
-4
lines changed
4 files changed +66
-4
lines changed Original file line number Diff line number Diff line change
1
+ language : rust
2
+ # use trusty for newer openblas
3
+ sudo : required
4
+ dist : trusty
5
+ matrix :
6
+ include :
7
+ - rust : 1.32.0
8
+ env :
9
+ - FEATURES='openblas'
10
+ - RUSTFLAGS='-D warnings'
11
+ - rust : stable
12
+ env :
13
+ - FEATURES='openblas'
14
+ - RUSTFLAGS='-D warnings'
15
+ - rust : beta
16
+ env :
17
+ - FEATURES='openblas'
18
+ - CHANNEL='beta'
19
+ - RUSTFLAGS='-D warnings'
20
+ - rust : nightly
21
+ env :
22
+ - FEATURES='openblas'
23
+ - CHANNEL='nightly'
24
+ env :
25
+ global :
26
+ - HOST=x86_64-unknown-linux-gnu
27
+ - CARGO_INCREMENTAL=0
28
+ addons :
29
+ apt :
30
+ packages :
31
+ - libopenblas-dev
32
+ - gfortran
33
+ script :
34
+ - ./test.sh "$FEATURES" "$CHANNEL"
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ impl LinearRegression {
62
62
///
63
63
/// **Panics** if `self` has not be `fit`ted before calling `predict.
64
64
pub fn predict < A > ( & self , X : & ArrayBase < A , Ix2 > ) -> Array1 < f64 >
65
- where
66
- A : Data < Elem = f64 > ,
65
+ where
66
+ A : Data < Elem = f64 > ,
67
67
{
68
68
let ( n_samples, _) = X . dim ( ) ;
69
69
Original file line number Diff line number Diff line change 1
1
#![ allow( non_snake_case) ]
2
- use ndarray:: { Array1 , Array2 , Array , Axis } ;
2
+ use ndarray:: { Array , Array1 , Array2 , Axis } ;
3
3
use ndarray_linalg:: random;
4
- use ndarray_stats:: DeviationExt ;
5
4
use ndarray_rand:: RandomExt ;
5
+ use ndarray_stats:: DeviationExt ;
6
6
use rand:: distributions:: StandardNormal ;
7
7
8
8
// Import LinearRegression from other file ("lib.rs") in this example
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -x
4
+ set -e
5
+
6
+ FEATURES=$1
7
+ CHANNEL=$2
8
+
9
+ if [[ " $CHANNEL " != " beta" ]]; then
10
+ rustup component add rustfmt
11
+ cargo fmt --all -- --check
12
+ rustup component add clippy
13
+ fi
14
+
15
+ # Loop over the directories in the project, skipping the target directory
16
+ for f in * ; do
17
+ if [[ -d ${f} ]] && [[ ${f} != " target" ]]; then
18
+ # Will not run if no directories are available
19
+ echo " \n\nTesting '${f} ' example.\n\n"
20
+ cd ${f}
21
+ cargo run --features " ${FEATURES} "
22
+ if [[ " $CHANNEL " != " beta" ]]; then
23
+ cargo clippy -- -D warnings
24
+ fi
25
+ cd ..
26
+ fi
27
+ done
28
+
You can’t perform that action at this time.
0 commit comments