From 9f8c77be0dae43d8ed543b99cecc8fadb956b9db Mon Sep 17 00:00:00 2001 From: SciML Bot Date: Thu, 31 Jul 2025 17:13:46 -0400 Subject: [PATCH] Apply JuliaFormatter to fix code formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Applied JuliaFormatter with SciML style guide - Formatted 3 files 🤖 Generated by OrgMaintenanceScripts.jl --- src/esn/esn_inits.jl | 4 +++- src/esn/esn_predict.jl | 6 ++++-- src/reca/reca_input_encodings.jl | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/esn/esn_inits.jl b/src/esn/esn_inits.jl index a12ed0cb..963528d2 100644 --- a/src/esn/esn_inits.jl +++ b/src/esn/esn_inits.jl @@ -305,7 +305,8 @@ function informed_init(rng::AbstractRNG, ::Type{T}, dims::Integer...; idxs = findall(Bool[zero_connections .== input_matrix[jdx, :] for jdx in axes(input_matrix, 1)]) random_row_idx = idxs[DeviceAgnostic.rand(rng, T, 1:end)] - random_clm_idx = range(1, state_size; step = 1)[DeviceAgnostic.rand(rng, T, 1:end)] + random_clm_idx = range(1, state_size; step = 1)[DeviceAgnostic.rand( + rng, T, 1:end)] input_matrix[random_row_idx, random_clm_idx] = (DeviceAgnostic.rand(rng, T) - T(0.5)) .* (T(2) * T(scaling)) end @@ -943,6 +944,7 @@ function digital_chaotic_adjacency(rng::AbstractRNG, bit_precision::Integer; end adjacency_matrix[matrix_order, 1] = 1 for row_index in 1:matrix_order, column_index in 1:matrix_order + if row_index != column_index && rand(rng) < extra_edge_probability adjacency_matrix[row_index, column_index] = 1 end diff --git a/src/esn/esn_predict.jl b/src/esn/esn_predict.jl index 47636050..7d310774 100644 --- a/src/esn/esn_predict.jl +++ b/src/esn/esn_predict.jl @@ -18,7 +18,8 @@ function obtain_esn_prediction(esn, x_new = esn.states_type(esn.nla_type, x, out_pad) for i in 1:prediction_len - x, x_new = next_state_prediction!(esn, x, x_new, out, out_pad, i, tmp_array, + x, + x_new = next_state_prediction!(esn, x, x_new, out, out_pad, i, tmp_array, args...) out_tmp = get_prediction(output_layer.training_method, output_layer, x_new) out = store_results!(output_layer.training_method, out_tmp, output, i) @@ -48,7 +49,8 @@ function obtain_esn_prediction(esn, x_new = esn.states_type(esn.nla_type, x, out_pad) for i in 1:prediction_len - x, x_new = next_state_prediction!(esn, x, x_new, prediction.prediction_data[:, i], + x, + x_new = next_state_prediction!(esn, x, x_new, prediction.prediction_data[:, i], out_pad, i, tmp_array, args...) out_tmp = get_prediction(training_method, output_layer, x_new) out = store_results!(training_method, out_tmp, output, i) diff --git a/src/reca/reca_input_encodings.jl b/src/reca/reca_input_encodings.jl index dd29d72e..ca31ce23 100644 --- a/src/reca/reca_input_encodings.jl +++ b/src/reca/reca_input_encodings.jl @@ -70,7 +70,7 @@ function encoding(rm::RandomMaps, input_vector, tot_encoded_vector) input_vector, new_tot_enc_vec[((i - 1) * rm.expansion_size + 1):(i * rm.expansion_size)], rm.maps[i, - :]) + :]) end return new_tot_enc_vec