diff --git a/examples/data_analysis_example/main.v b/examples/data_analysis_example/main.v index 21f1169ef..b504d2499 100644 --- a/examples/data_analysis_example/main.v +++ b/examples/data_analysis_example/main.v @@ -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 @@ -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 diff --git a/examples/fft_plot_example/main.v b/examples/fft_plot_example/main.v index de005ee15..d4ee07daa 100644 --- a/examples/fft_plot_example/main.v +++ b/examples/fft_plot_example/main.v @@ -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 @@ -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 diff --git a/examples/plot_bubble_chart/main.v b/examples/plot_bubble_chart/main.v index 1c350591d..5a5491054 100644 --- a/examples/plot_bubble_chart/main.v +++ b/examples/plot_bubble_chart/main.v @@ -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' diff --git a/examples/plot_scatter/main.v b/examples/plot_scatter/main.v index cba3e373e..2258a73de 100644 --- a/examples/plot_scatter/main.v +++ b/examples/plot_scatter/main.v @@ -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' } ) diff --git a/examples/plot_scatter3d_1/main.v b/examples/plot_scatter3d_1/main.v index cdf55bc6f..c82de9847 100644 --- a/examples/plot_scatter3d_1/main.v +++ b/examples/plot_scatter3d_1/main.v @@ -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' } ) diff --git a/examples/plot_scatter_with_annotations/main.v b/examples/plot_scatter_with_annotations/main.v index c836f9c96..a8ee6aba9 100644 --- a/examples/plot_scatter_with_annotations/main.v +++ b/examples/plot_scatter_with_annotations/main.v @@ -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' } ) diff --git a/examples/plot_scatter_with_regression/main.v b/examples/plot_scatter_with_regression/main.v index 2c3250862..fc87ddf93 100644 --- a/examples/plot_scatter_with_regression/main.v +++ b/examples/plot_scatter_with_regression/main.v @@ -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 diff --git a/examples/plot_shaded_area_sin/main.v b/examples/plot_shaded_area_sin/main.v index a97e701c7..4d633bb97 100644 --- a/examples/plot_shaded_area_sin/main.v +++ b/examples/plot_shaded_area_sin/main.v @@ -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)' diff --git a/float/float32/ge_test.v b/float/float32/ge_test.v index 57af56945..a094ea213 100644 --- a/float/float32/ge_test.v +++ b/float/float32/ge_test.v @@ -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()), diff --git a/float/float64/ge_test.v b/float/float64/ge_test.v index f4f9c293c..83d5219e7 100644 --- a/float/float64/ge_test.v +++ b/float/float64/ge_test.v @@ -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, diff --git a/iter/ranges.v b/iter/ranges.v index 818ccc88b..d655f4416 100644 --- a/iter/ranges.v +++ b/iter/ranges.v @@ -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 } } diff --git a/plot/show.v b/plot/show.v index 6bd596180..aece39f3d 100644 --- a/plot/show.v +++ b/plot/show.v @@ -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)) {