The scipy function doesn’t change the shape because it uses padding, by default.
There is an optional padding option for torch.nn.Conv1d.
The shape of the weight tensor depends of the number of in_channels and out_channels.
In your example, can you clarify what does the size [6, 6, 1] of your tensor B correspond to ?