Closed SiemondeLange closed 1 year ago
Hi @SiemondeLange,
thank you for reporting us this issue. You can still create the group_idx
variable as a numpy array with inhomogeneous shape by specifying the parameter dtype=np.object_
,
i.e. group_idx = np.array( [np.arange(tmp[i],tmp[i+1]) for i in range(len(tmp)-1)], dtype=np.object_ )
.
This should resolve your issue. We will update the documentation and the example code in the wiki with this tip.
Thank you @nightwnvol for your prompt response to my issue. The error was indeed solved when I tried your suggestion to specify dtype=np.object_
.
When attempting to run the example code for creating the
group_idx
variable for COMMIT2 using Numpy version 1.24.0, I encounter an "inhomogeneous shape error":This error might potentially also be an issue for COMMIT2, because the
structureIC
parameter ofcommit.solvers.init_regularisation
is expected to be an inhomogeneous numpy array, as shown in the example provided in the documentationnp.array([[0,2,5],[1,3,4],[0,1,2,3,4,5],[6]])
.It appears that this issue is caused by Numpy deprecating the construction of inhomogeneous arrays in version 24. While a long-term solution may require modifications to the code, a short-term solution could advice users to use Numpy version 1.23.5 until the issue is resolved.