Skip to content

Commit

Permalink
preserve input type in _to_diagonal - PDLPorters/pdl#511
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Dec 20, 2024
1 parent 7f7ab6a commit 6b3eb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/PDL/IO/Touchstone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ sub _to_diagonal

if (!@dims || (@dims == 1 && $dims[0] == 1))
{
$ret = zeroes($n_ports,$n_ports);
$ret = zeroes($v->type,$n_ports,$n_ports);
$ret->diagonal(0,1) .= $v;
}
elsif (@dims == 1 && $dims[0] == $n_ports)
Expand Down

0 comments on commit 6b3eb20

Please sign in to comment.