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
use ;
/// Create a 2-dimensional array with a linear gradient.
///
/// # Description
///
/// Creates a linear gradient of increasing values from the top of the array to
/// the bottom along the row axis. Setting the `offset` parameter controls how
/// far the gradient extends while the `scale` parameter controls the rate
/// values increase per row.
///
/// # Arguments
///
/// * `offset`: The number of rows from the top of the array that remain at
/// zero.
/// * `scale`: The rate of increase per row. This value controls the steepness
/// of the gradient.
/// * `shape`: The row and col shape of the gradient array.
///
/// # Returns
///
/// * `Array2<f64>`: The 2-dimensional gradient array.
/// Create a 3-dimensional array with a linear gradient.
///
/// # Description
///
/// Creates a linear gradient of increasing values from the top of the array to
/// the bottom along the pln or z axis. Setting the `offset` parameter controls
/// how far the gradient extends while the `scale` parameter controls the rate
/// values increase per pln.
///
/// # Arguments
///
/// * `offset`: The number of plns from the top of the array tha tremain at
/// zero.
/// * `scale`: The rate of increase per pln. This value controls the steepness
/// of the gradient.
/// * `shape`: The pln, row and col shape of the gradient array.
///
/// # Returns
///
/// * `Array3<f64>`: The 3-dimensional gradient array.