Skip to content

Commit f013f50

Browse files
authored
Bump ndarray from 0.15.4 to 0.16.0 (#220)
1 parent 4e47e85 commit f013f50

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

examples/3d_charts/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ authors = ["Michael Freeborn <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ndarray = "0.15.6"
8+
ndarray = "0.16.0"
99
rand = "0.8.5"
1010
plotly = { path = "../../plotly" }

examples/3d_charts/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rand::Rng;
1212
// 3D Scatter Plots
1313
fn simple_scatter3d_plot() {
1414
let n: usize = 100;
15-
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec();
15+
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec_and_offset().0;
1616
let y: Vec<f64> = t.iter().map(|x| x.sin()).collect();
1717
let z: Vec<f64> = t.iter().map(|x| x.cos()).collect();
1818

@@ -25,7 +25,7 @@ fn simple_scatter3d_plot() {
2525

2626
fn customized_scatter3d_plot() {
2727
let n: usize = 100;
28-
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec();
28+
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec_and_offset().0;
2929
let y: Vec<f64> = t.iter().map(|x| x.sin()).collect();
3030
let z: Vec<f64> = t.iter().map(|x| x.cos()).collect();
3131
let sizelookup = z.clone();
@@ -114,7 +114,7 @@ fn customized_scatter3d_plot() {
114114
// 3D Line Plots
115115
fn simple_line3d_plot() {
116116
let n: usize = 100;
117-
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec();
117+
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec_and_offset().0;
118118
let y: Vec<f64> = t.iter().map(|x| x.sin()).collect();
119119
let z: Vec<f64> = t.iter().map(|x| x.cos()).collect();
120120

@@ -128,8 +128,8 @@ fn simple_line3d_plot() {
128128
// 3D Surface Plot
129129
fn surface_plot() {
130130
let n: usize = 100;
131-
let x: Vec<f64> = Array::linspace(-10., 10., n).into_raw_vec();
132-
let y: Vec<f64> = Array::linspace(-10., 10., n).into_raw_vec();
131+
let x: Vec<f64> = Array::linspace(-10., 10., n).into_raw_vec_and_offset().0;
132+
let y: Vec<f64> = Array::linspace(-10., 10., n).into_raw_vec_and_offset().0;
133133
let z: Vec<Vec<f64>> = x
134134
.iter()
135135
.map(|i| {

examples/basic_charts/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Michael Freeborn <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ndarray = "0.15.6"
8+
ndarray = "0.16.0"
99
plotly = { path = "../../plotly" }
1010
rand = "0.8.5"
1111
rand_distr = "0.4.3"

examples/basic_charts/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rand_distr::{Distribution, Normal, Uniform};
1717
// Scatter Plots
1818
fn simple_scatter_plot() {
1919
let n: usize = 100;
20-
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec();
20+
let t: Vec<f64> = Array::linspace(0., 10., n).into_raw_vec_and_offset().0;
2121
let y: Vec<f64> = t.iter().map(|x| x.sin()).collect();
2222

2323
let trace = Scatter::new(t, y).mode(Mode::Markers);
@@ -30,7 +30,7 @@ fn simple_scatter_plot() {
3030
fn line_and_scatter_plots() {
3131
let n: usize = 100;
3232
let mut rng = rand::thread_rng();
33-
let random_x: Vec<f64> = Array::linspace(0., 1., n).into_raw_vec();
33+
let random_x: Vec<f64> = Array::linspace(0., 1., n).into_raw_vec_and_offset().0;
3434
let random_y0: Vec<f64> = Normal::new(5., 1.)
3535
.unwrap()
3636
.sample_iter(&mut rng)
@@ -86,7 +86,7 @@ fn bubble_scatter_plots() {
8686

8787
fn polar_scatter_plot() {
8888
let n: usize = 400;
89-
let theta: Vec<f64> = Array::linspace(0., 360., n).into_raw_vec();
89+
let theta: Vec<f64> = Array::linspace(0., 360., n).into_raw_vec_and_offset().0;
9090
let r: Vec<f64> = theta
9191
.iter()
9292
.map(|x| {

examples/images/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ edition = "2021"
66

77
[dependencies]
88
image = "0.25"
9-
ndarray = "0.15.6"
9+
ndarray = "0.16.0"
1010
plotly = { path = "../../plotly", features = ["plotly_image", "plotly_ndarray"] }

examples/ndarray/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Michael Freeborn <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ndarray = "0.15.6"
8+
ndarray = "0.16.0"
99
plotly = { path = "../../plotly", features = ["plotly_ndarray"] }

examples/shapes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Michael Freeborn <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ndarray = "0.15.6"
8+
ndarray = "0.16.0"
99
plotly = { path = "../../plotly" }
1010
rand = "0.8.5"
1111
rand_distr = "0.4.3"

examples/shapes/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn lines_positioned_relative_to_the_plot_and_to_the_axes() {
130130
}
131131

132132
fn creating_tangent_lines_with_shapes() {
133-
let x0 = Array::linspace(1.0, 3.0, 200).into_raw_vec();
133+
let x0 = Array::linspace(1.0, 3.0, 200).into_raw_vec_and_offset().0;
134134
let y0 = x0.iter().map(|v| *v * (v.powf(2.)).sin() + 1.).collect();
135135

136136
let trace = Scatter::new(x0, y0);

examples/statistical_charts/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Michael Freeborn <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ndarray = "0.15.6"
8+
ndarray = "0.16.0"
99
plotly = { path = "../../plotly" }
1010
rand = "0.8.5"
1111
rand_distr = "0.4.3"

examples/statistical_charts/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn bar_chart_with_error_bars() {
9393
}
9494

9595
fn colored_and_styled_error_bars() {
96-
let x_theo: Vec<f64> = Array::linspace(-4., 4., 100).into_raw_vec();
96+
let x_theo: Vec<f64> = Array::linspace(-4., 4., 100).into_raw_vec_and_offset().0;
9797
let sincx: Vec<f64> = x_theo
9898
.iter()
9999
.map(|x| (x * std::f64::consts::PI).sin() / (*x * std::f64::consts::PI))

plotly/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ image = { version = "0.25", optional = true }
3030
js-sys = { version = "0.3", optional = true }
3131
plotly_derive = { version = "0.9.0", path = "../plotly_derive" }
3232
plotly_kaleido = { version = "0.9.0", path = "../plotly_kaleido", optional = true }
33-
ndarray = { version = "0.15.4", optional = true }
33+
ndarray = { version = "0.16.0", optional = true }
3434
once_cell = "1"
3535
serde = { version = "1.0.132", features = ["derive"] }
3636
serde_json = "1.0.73"
@@ -45,6 +45,6 @@ csv = "1.1.6"
4545
image = "0.25"
4646
itertools = ">=0.10, <0.14"
4747
itertools-num = "0.1.3"
48-
ndarray = "0.15.4"
48+
ndarray = "0.16.0"
4949
plotly_kaleido = { version = "0.9.0", path = "../plotly_kaleido" }
5050
rand_distr = "0.4"

plotly/src/traces/scatter_polar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ where
266266
/// let theta: Array<f64, Ix1> = Array::range(0., 360., 360. / n as f64);
267267
/// let mut rs: Array<f64, Ix2> = Array::zeros((11, 11));
268268
/// let mut count = 0.;
269-
/// for mut row in rs.gencolumns_mut() {
269+
/// for mut row in rs.columns_mut() {
270270
/// for index in 0..row.len() {
271271
/// row[index] = count + (index as f64).powf(2.);
272272
/// }

0 commit comments

Comments
 (0)