Incorrect array shape in magnetic_gauge
In these lines if the list is empty, a numpy array is created with an incorrect shape, and the assignment fails.
In these lines if the list is empty, a numpy array is created with an incorrect shape, and the assignment fails.