File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2937,15 +2937,21 @@ def wrsamp(
2937
2937
# If samps_per_frame is a list, check that it aligns as expected with the channels in the signal
2938
2938
if isinstance (samps_per_frame , list ):
2939
2939
# Get properties of the signal being passed
2940
- first_valid_signal = next (signal for signal in signal_list if signal is not None )
2940
+ first_valid_signal = next (
2941
+ signal for signal in signal_list if signal is not None
2942
+ )
2941
2943
if isinstance (first_valid_signal , np .ndarray ):
2942
2944
num_sig_channels = first_valid_signal .shape [1 ]
2943
- channel_samples = [first_valid_signal .shape [0 ]] * first_valid_signal .shape [1 ]
2945
+ channel_samples = [
2946
+ first_valid_signal .shape [0 ]
2947
+ ] * first_valid_signal .shape [1 ]
2944
2948
elif isinstance (first_valid_signal , list ):
2945
2949
num_sig_channels = len (first_valid_signal )
2946
2950
channel_samples = [len (channel ) for channel in first_valid_signal ]
2947
2951
else :
2948
- raise TypeError ("Unsupported signal format. Must be ndarray or list of lists." )
2952
+ raise TypeError (
2953
+ "Unsupported signal format. Must be ndarray or list of lists."
2954
+ )
2949
2955
2950
2956
# Check that the number of channels matches the number of samps_per_frame entries
2951
2957
if num_sig_channels != len (samps_per_frame ):
You can’t perform that action at this time.
0 commit comments