Skip to content

Commit 3628739

Browse files
committed
Sort sections
1 parent 9d1b0f8 commit 3628739

File tree

1 file changed

+32
-42
lines changed

1 file changed

+32
-42
lines changed

README.md

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
11
ndarray-linalg
22
===============
3+
[![CircleCI](https://circleci.com/gh/termoshtt/ndarray-linalg.svg?style=shield)](https://circleci.com/gh/termoshtt/ndarray-linalg)
34
[![Crate](http://meritbadge.herokuapp.com/ndarray-linalg)](https://crates.io/crates/ndarray-linalg)
45
[![docs.rs](https://docs.rs/ndarray-linalg/badge.svg)](https://docs.rs/ndarray-linalg)
5-
[![CircleCI](https://circleci.com/gh/termoshtt/ndarray-linalg.svg?style=shield)](https://circleci.com/gh/termoshtt/ndarray-linalg)
6-
[![Gitter chat](https://badges.gitter.im/termoshtt-scirust/ndarray-linalg.png)](https://gitter.im/termoshtt-scirust/ndarray-linalg)
76

8-
Linear algebra package for Rust with [rust-ndarray](https://github.com/bluss/rust-ndarray).
7+
Linear algebra package for Rust with [ndarray](https://github.com/bluss/ndarray) based on external LAPACK implementations.
8+
9+
Examples
10+
---------
11+
See [examples](https://github.com/termoshtt/ndarray-linalg/tree/master/examples) directory.
12+
13+
Note that to run an example, you must specify the desired backend (as described below).
14+
For example, you can run the the `solve` example with the OpenBLAS backend like this:
15+
16+
```sh
17+
cargo run --example solve --features=openblas
18+
```
19+
20+
and test of ndarray-linalg:
921

10-
LAPACKE Backend
11-
----------------
22+
```sh
23+
cargo test --features=openblas
24+
```
1225

13-
Currently three LAPACKE implementations are supported and tested:
26+
BLAS/LAPACK Backend
27+
-------------------
28+
29+
Three BLAS/LAPACK implementations are supported:
1430

1531
- [OpenBLAS](https://github.com/cmr/openblas-src)
1632
- needs `gfortran` (or other Fortran compiler)
@@ -19,9 +35,6 @@ Currently three LAPACKE implementations are supported and tested:
1935
- [Intel MKL](https://github.com/termoshtt/rust-intel-mkl) (non-free license, see the linked page)
2036
- needs `curl`
2137

22-
There are two ways to link LAPACKE backend:
23-
24-
### backend features (recommended)
2538
There are three features corresponding to the backend implementations (`openblas` / `netlib` / `intel-mkl`):
2639

2740
```toml
@@ -30,7 +43,16 @@ ndarray = "0.12"
3043
ndarray-linalg = { version = "0.10", features = ["openblas"] }
3144
```
3245

33-
### link backend crate manually
46+
### For librarian
47+
If you creating a library depending on this crate, we encourage you not to link any backend:
48+
49+
```toml
50+
[dependencies]
51+
ndarray = "0.12"
52+
ndarray-linalg = "0.10"
53+
```
54+
55+
### Link backend crate manually
3456
For the sake of linking flexibility, you can provide LAPACKE implementation (as an `extern crate`) yourself.
3557
You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library.
3658

@@ -49,35 +71,3 @@ extern crate ndarray;
4971
extern crate ndarray_linalg;
5072
extern crate openblas_src; // or another backend of your choice
5173
```
52-
53-
### For librarian
54-
If you creating a library depending on this crate, we encourage you not to link any backend for flexibility:
55-
56-
```toml
57-
[dependencies]
58-
ndarray = "0.12"
59-
ndarray-linalg = { version = "0.10", default-features = false }
60-
```
61-
62-
However, if you hope simplicity instead of the flexibility, you can link your favorite backend in the way described above.
63-
64-
### Tests and Examples
65-
66-
To run tests or examples for `ndarray-linalg`, you must specify the desired
67-
backend. For example, you can run the tests with the OpenBLAS backend like
68-
this:
69-
70-
```sh
71-
cargo test --features=openblas
72-
```
73-
74-
Examples
75-
---------
76-
See [examples](https://github.com/termoshtt/ndarray-linalg/tree/master/examples) directory.
77-
78-
Note that to run an example, you must specify the desired backend. For example,
79-
you can run the the `solve` example with the OpenBLAS backend like this:
80-
81-
```sh
82-
cargo run --example solve --features=openblas
83-
```

0 commit comments

Comments
 (0)