Commit a1f7f7a0 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira

Merge branch 'issue-31' into 'master'

Fixing possible issue with numpy.ndarray.resize

Closes #31

See merge request !37
parents 3124663e 0cb8e221
Pipeline #33115 passed with stages
in 41 minutes and 3 seconds
......@@ -57,9 +57,9 @@ class PythonPLDATrainer():
n_features = data[0].shape[1]
self.m_z_first_order = []
df_dg = self.m_dim_f+self.m_dim_g
self.m_sum_z_second_order.resize(df_dg, df_dg)
self.m_n_samples_per_id.resize(len(data))
self.m_B.resize(n_features, df_dg)
self.m_sum_z_second_order = numpy.resize(self.m_sum_z_second_order, (df_dg, df_dg))
self.m_n_samples_per_id = numpy.resize(self.m_n_samples_per_id, (len(data)))
self.m_B = numpy.resize(self.m_B, (n_features, df_dg))
for i in range(len(data)):
ns_i = data[i].shape[0]
self.m_n_samples_per_id[i] = ns_i
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment