Skip to content

Commit

Permalink
run v fmt -w ~/.vmodules/vsl with v fmt from vlang/v#22232
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Sep 17, 2024
1 parent 5796d61 commit 2c4ff91
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions examples/data_analysis_example/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn main() {
size: []f64{len: x1_class0.len, init: 8.0}
color: []string{len: x1_class0.len, init: 'blue'}
}
name: 'Class 0'
name: 'Class 0'
)
plt_3d.scatter3d(
x: x1_class1
Expand All @@ -105,7 +105,7 @@ fn main() {
size: []f64{len: x1_class1.len, init: 8.0}
color: []string{len: x1_class1.len, init: 'red'}
}
name: 'Class 1'
name: 'Class 1'
)

// Configure the layout of the 3D plot
Expand Down
4 changes: 2 additions & 2 deletions examples/fft_plot_example/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn main() {
marker: plot.Marker{
size: []f64{len: original_signal.len, init: 8.0}
}
name: 'Original Signal'
name: 'Original Signal'
)

// Add a scatter plot for the imaginary part of the spectrum
Expand All @@ -43,7 +43,7 @@ fn main() {
marker: plot.Marker{
size: []f64{len: spectrum.len, init: 8.0}
}
name: 'FFT Spectrum'
name: 'FFT Spectrum'
)

// Set up the layout
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_bubble_chart/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
size: size
color: []string{len: x.len * y.len, init: '#FF0000'}
}
name: 'Bubble Chart'
name: 'Bubble Chart'
)
plt.layout(
title: 'Bubble Chart'
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scatter/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {
size: []f64{len: x.len, init: 10.0}
color: []string{len: x.len, init: '#FF0000'}
}
line: plot.Line{
line: plot.Line{
color: '#FF0000'
}
)
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scatter3d_1/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn main() {
size: []f64{len: x.len, init: 10.0}
color: []string{len: x.len, init: '#0000FF'}
}
line: plot.Line{
line: plot.Line{
color: '#0000FF'
}
)
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scatter_with_annotations/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() {
size: []f64{len: x.len, init: 10.0}
color: []string{len: x.len, init: '#FF0000'}
}
line: plot.Line{
line: plot.Line{
color: '#FF0000'
}
)
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scatter_with_regression/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
size: []f64{len: x.len, init: 10.0}
color: []string{len: x.len, init: '#00FF00'}
}
name: 'Data Points'
name: 'Data Points'
)
plt.scatter(
x: x
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_shaded_area_sin/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {
line: plot.Line{
color: 'rgba(0, 0, 255, 0)'
}
name: 'Shaded Area'
name: 'Shaded Area'
)
plt.layout(
title: 'Shaded Area under sin(x)'
Expand Down
20 changes: 10 additions & 10 deletions float/float32/ge_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ const ge_tests = [// m x n ( kernels executed )
-6]
},
GeTest{ // 3 x 6 ( 2x4, 2x2, 1x4, 1x2 )
x: [f32(-2.0), -3, 0]
y: [f32(-1.1), 5, 0, 9, 19, 22]
a: [f32(1.3), 2.4, 3.5, 4.8, 1.11, -9, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, -1.3, -4.3, -9.7,
x: [f32(-2.0), -3, 0]
y: [f32(-1.1), 5, 0, 9, 19, 22]
a: [f32(1.3), 2.4, 3.5, 4.8, 1.11, -9, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, -1.3, -4.3, -9.7,
-3.1, 8.9, 8.9]
want: [f32(3.5), -7.6, 3.5, -13.2, -36.89, -53, 5.9, -12.2, 3.3, -30.4, -50.8, -74.7, -1.3,
-4.3, -9.7, -3.1, 8.9, 8.9]
},
GeTest{ // 5 x 5 ( 4x4, 4x1, 1x4, 1x1)
x: [f32(-2.0), 0, 2, 0, 7]
y: [f32(-1.1), 8, 7, 3, 5]
a: [f32(1.3), 2.4, 3.5, 2.2, 8.3, 2.6, 2.8, 3.3, 4.4, -1.5, -1.3, -4.3, -9.7, -8.8, 6.2,
8, 9, -10, -11, 12, -12, -14, -6, -2, 4]
x: [f32(-2.0), 0, 2, 0, 7]
y: [f32(-1.1), 8, 7, 3, 5]
a: [f32(1.3), 2.4, 3.5, 2.2, 8.3, 2.6, 2.8, 3.3, 4.4, -1.5, -1.3, -4.3, -9.7, -8.8,
6.2, 8, 9, -10, -11, 12, -12, -14, -6, -2, 4]
want: [f32(3.5), -13.6, -10.5, -3.8, -1.7, 2.6, 2.8, 3.3, 4.4, -1.5, -3.5, 11.7, 4.3, -2.8,
16.2, 8, 9, -10, -11, 12, -19.700000000000003, 42, 43, 19, 39]
},
GeTest{ // 7 x 7 ( 4x4, 4x2, 4x1, 2x4, 2x2, 2x1, 1x4, 1x2, 1x1 ) < f32(math.nan()) test >
x: [f32(-2.0), 8, 9, -3, -1.2, 5, 4.5]
y: [f32(-1.1), f32(math.nan()), 19, 11, -9.22, 7, 3.3]
a: [f32(1.3), 2.4, 3.5, 4.8, 1.11, -9, 2.2, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, -1.3,
x: [f32(-2.0), 8, 9, -3, -1.2, 5, 4.5]
y: [f32(-1.1), f32(math.nan()), 19, 11, -9.22, 7, 3.3]
a: [f32(1.3), 2.4, 3.5, 4.8, 1.11, -9, 2.2, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, -1.3,
-4.3, -9.7, -3.1, 8.9, 8.9, 8, 5, -2.5, 1.8, -3.6, 2.8, 4.9, 7, -1.3, -4.3, -9.7, -3.1,
8.9, 8.9, 8, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, 1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.2]
want: [f32(3.5), f32(math.nan()), -34.5, -17.2, 19.55, -23, -4.4, -6.2, f32(math.nan()),
Expand Down
22 changes: 11 additions & 11 deletions float/float64/ge_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ const ge_tests = [// m x n ( kernels executed )
want: [3.5, -7.6, 3.5, 5.9, -12.2, 3.3, -1.3, -4.3, -9.7, 6.9, 14, -10, -14.2, -4, -6]
},
GeTest{ // 3 x 6 ( 2x4, 2x2, 1x4, 1x2 )
x: [-2.0, -3, 0]
y: [-1.1, 5, 0, 9, 19, 22]
a: [1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, -1.3, -4.3, -9.7, -3.1,
8.9, 8.9]
x: [-2.0, -3, 0]
y: [-1.1, 5, 0, 9, 19, 22]
a: [1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, -1.3, -4.3, -9.7,
-3.1, 8.9, 8.9]
want: [3.5, -7.6, 3.5, -13.2, -36.89, -53, 5.9, -12.2, 3.3, -30.4, -50.8, -74.7, -1.3,
-4.3, -9.7, -3.1, 8.9, 8.9]
},
GeTest{ // 5 x 5 ( 4x4, 4x1, 1x4, 1x1)
x: [-2.0, 0, 2, 0, 7]
y: [-1.1, 8, 7, 3, 5]
a: [1.3, 2.4, 3.5, 2.2, 8.3, 2.6, 2.8, 3.3, 4.4, -1.5, -1.3, -4.3, -9.7, -8.8, 6.2, 8,
9, -10, -11, 12, -12, -14, -6, -2, 4]
x: [-2.0, 0, 2, 0, 7]
y: [-1.1, 8, 7, 3, 5]
a: [1.3, 2.4, 3.5, 2.2, 8.3, 2.6, 2.8, 3.3, 4.4, -1.5, -1.3, -4.3, -9.7, -8.8, 6.2,
8, 9, -10, -11, 12, -12, -14, -6, -2, 4]
want: [3.5, -13.6, -10.5, -3.8, -1.7, 2.6, 2.8, 3.3, 4.4, -1.5, -3.5, 11.7, 4.3, -2.8,
16.2, 8, 9, -10, -11, 12, -19.700000000000003, 42, 43, 19, 39]
},
GeTest{ // 7 x 7 ( 4x4, 4x2, 4x1, 2x4, 2x2, 2x1, 1x4, 1x2, 1x1 ) < math.nan() test >
x: [-2.0, 8, 9, -3, -1.2, 5, 4.5]
y: [-1.1, math.nan(), 19, 11, -9.22, 7, 3.3]
a: [1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.2, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, -1.3, -4.3,
x: [-2.0, 8, 9, -3, -1.2, 5, 4.5]
y: [-1.1, math.nan(), 19, 11, -9.22, 7, 3.3]
a: [1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.2, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, -1.3, -4.3,
-9.7, -3.1, 8.9, 8.9, 8, 5, -2.5, 1.8, -3.6, 2.8, 4.9, 7, -1.3, -4.3, -9.7, -3.1, 8.9,
8.9, 8, 2.6, 2.8, 3.3, -3.4, 6.2, -8.7, 5.1, 1.3, 2.4, 3.5, 4.8, 1.11, -9, 2.2]
want: [3.5, math.nan(), -34.5, -17.2, 19.55, -23, -4.4, -6.2, math.nan(), 155.3, 84.6,
Expand Down
4 changes: 2 additions & 2 deletions iter/ranges.v
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ pub fn LogIter.new(params LogIterParams) !LogIter {
len: params.len
endpoint: params.endpoint
)!
base: params.base
len: params.len
base: params.base
len: params.len
}
}

Expand Down
2 changes: 1 addition & 1 deletion plot/show.v
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn (p Plot) get_plotly_script(element_id string, config PlotlyScriptConfig)
attributes: {
'type': 'module'
}
content: 'import "https://cdn.plot.ly/plotly-2.26.2.min.js";
content: 'import "https://cdn.plot.ly/plotly-2.26.2.min.js";
function removeEmptyFieldsDeeply(obj) {
if (Array.isArray(obj)) {
Expand Down

0 comments on commit 2c4ff91

Please sign in to comment.