-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
97 lines (94 loc) · 4.62 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[package]
name = "rust-examples"
description = "Common Matlab idioms in ndarary with Rust."
version = "0.2.0"
authors = ["Benjamin Kay <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
readme = "README.md"
[dependencies]
# Note that the ndarray ecosystem of crates is "unstable" in the sense that they
# are undergoing rapid development with breaking changes between versions.
# Until we hit version 1.0 you must typically specify the exact minor version
# number for each crate to ensure compatibility (compilation will fail if you
# get it wrong). ndarray-linalg is typically the "oldest" crate which then
# dictates which version of ndarray and friends you need.
# The core crates: ndarray, with support for multithreading with rayon and
# optimized matrix operations with blas, and ndarray-linalg, which offers
# additional linear algebra routine using lapack.
#
# Use the same minor version as ndarray-linalg.
ndarray = { version = "~0.15", features = ["approx", "blas", "rayon"] }
# Use the latest stable version.
ndarray-linalg = "~0.14"
# The approx feature for ndarray and associated crate are needed for approximate
# comparison of floating point numbers.
# Use the same minor version as ndarray-linalg.
approx = { version = "~0.4", features = ["num-complex"] }
# For fine-tuned control over the rayon threading library.
# Use the same major version as ndarray.
rayon = "^1.5.1"
# Support for the numpy file format.
# Use the latest minor version to support this version of ndarray.
ndarray-npy = "~0.8"
# Support for writing generic functions using complex (imaginary) numbers.
# Use the same minor versions as ndarray-linalg.
num-complex = "~0.4"
num-traits = "~0.2"
# Detect the number of CPU cores available.
num_cpus = "^1"
# Support for random number generation and basic distributions (e.g. normal).
#
# Use same minor version as ndarray-linalg.
rand = "~0.8"
# Use same minor version published in workspace for rand crate.
rand_distr = "~0.4"
# Use same minor version published in workspace for this version of ndarray.
ndarray-rand = "~0.14"
# Inverse CDF functions (e.g. for the T distribution) for computing p-values.
statrs = "~0.14"
# Linking against a backend
#
# ndarray (optionally) uses blas for optimization, and ndarray-linalg depends on
# blas/lapack for optimized linear solvers. You should specify a blas/lapack
# library, or "backend," to link against. There are several options. Here we
# use the widely-available openblas library.
#
# In addition, you must add the following line to the source file for the binary
# that needs to be linked:
# extern crate blas_src;
#
# If you are writing a library you ideally should *not* specify a blas/lapack
# backend, so that the binary crate which depends on your library will be free
# to select its own backend. You should depend on ndarray and ndarray-linalg
# using the features above, which are agnostic with regard to the backend. Note
# that ndarray is configured with the blas feature. This feature just tells
# ndarray that it will link against blas, not which backend to use.
#
# If, as in this example, you are writing a binary crate, then you must specify
# a blas/lapack backend using the dependencies below. Otherwise compilation
# will fail at the linking step.
#
# If you are writing a library that has unit tests, specify the backend against
# which to link your unit tests under [dev-dependencies].
#
# For ndarray, use the blas feature for library or binary crates. Then in your
# binary crate depend on blas-src and lapack-src to specify your blas backend;
# here it is openblas. Then depend on openblas-src with the cblas feature.
# Your openblas can also depend on the system feature (the default) to link
# against the system's openblas or the static feature to compile your own
# openblas and link against it statically. Ideally your ndarray should depend
# on the same openblas-src (i.e. system or static) as ndarray-linalg.
#
# For ndarray-linalg, depend on lax with either the openblas-system or
# openblas-static feature. Then depend on openblas-src with cblas and lapacke
# features, and the appropriate system or static feature.
#
# Use latest minor version to depend on this minor version of openblas-src.
blas-src = { version = "~0.8", default-features = false, features = ["openblas"] }
# Use latest minor version to depend on this minor verion of openblas-src.
lapack-src = { version = "~0.8", default-features = false, features = ["openblas"] }
# Use same minor version published in workspace of ndarray-linalg.
lax = { version = "~0.2", features = ["openblas-system"] }
# Use minor version from lax.
openblas-src = { version = "~0.10", features = ["cblas", "lapacke", "system"] }