Closed DimitriPapadopoulos closed 1 year ago
Python 3.11 reports this bug related to the use of dataclasses:
ValueError: mutable default <class 'numpy.ndarray'> for field sz is not allowed: use default_factory
Need to use default factory functions to avoid mutable default values (np.array): https://github.com/wtclarke/pymapvbvd/blob/26471620a77c7d2766d816e784b0600ea508fc7e/mapvbvd/twix_map_obj.py#L197-L204
np.array
See also https://github.com/wtclarke/spec2nii/pull/55.
Python 3.11 reports this bug related to the use of dataclasses:
Need to use default factory functions to avoid mutable default values (
np.array
): https://github.com/wtclarke/pymapvbvd/blob/26471620a77c7d2766d816e784b0600ea508fc7e/mapvbvd/twix_map_obj.py#L197-L204See also https://github.com/wtclarke/spec2nii/pull/55.