Skip to content

Commit

Permalink
PDL::Slatec::polyfit(): the weight ($w) dims need to match the data dims
Browse files Browse the repository at this point in the history
This addresses the issue <https://sourceforge.net/p/pdl/bugs/368/>,
<#48>.
  • Loading branch information
zmughal committed Mar 5, 2015
1 parent d245a61 commit 1df5338
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/Slatec/slatec.pd
Expand Up @@ -579,6 +579,10 @@ sub PDL::polyfit {

my ($x_in, $y_in, $w_in, $maxdeg_in, $eps_in) = @_;

# if $w_in does not match the data vectors ($x_in, $y_in), then we can resize
# it to match the size of $y_in :
$w_in += $y_in->zeros;

# Create the output arrays
my $r = PDL->null;

Expand Down

0 comments on commit 1df5338

Please sign in to comment.