Skip to content

Update multiarea_helpers.py

Didi Hou requested to merge jarsi-patch-1 into master

Created by: jarsi

If either N_scaling or K_scaling is different from 1, some quantities are scaled. Eg. the number of neurons, the number of synapses, the indegree, the weights...

The initial dictionaries are first converted to matrices. Then the scaling is performed using the matrices. After that the matrices are converted back to dictionaries again. For the conversion the matrix_to_dict() function is used. While recreating the dictionaries a check whether a given value is less than 1e-20 is performed. Most of the matrices to be scaled contain only positive numbers. Only the weights dictionary / matrix contains negative numbers stemming from inhibitory connections. Using the comparison as is leads to all inhibitory weights being set to 0 if any scaling is used.

I think this comparison should be used to only set any value close to 0 to actual 0, instead of setting all values slightly above 0 to 0.

Merge request reports