File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2066,6 +2066,7 @@ pp_def('vcos',
20662066 GenericTypes => [ppdefs_all],
20672067 HandleBad => 1,
20682068 Code => pp_line_numbers(__LINE__, <<'EOF'),
2069+ broadcastloop %{
20692070$GENERIC(vcos) bnorm = 0;
20702071loop(M) %{
20712072 PDL_IF_BAD(if ($ISBAD(b())) continue;,)
@@ -2097,12 +2098,10 @@ loop (N) %{
20972098 $vcos() = NAN;
20982099 }
20992100%}
2101+ %}
2102+ if ( $PDLSTATEISBAD(a) || $PDLSTATEISBAD(b) )
2103+ $PDLSTATESETBAD(vcos);
21002104EOF
2101- CopyBadStatusCode => q{
2102- if ( $ISPDLSTATEBAD(a) || $ISPDLSTATEBAD(b) ) {
2103- $SETPDLSTATEBAD(vcos);
2104- }
2105- },
21062105 Doc => q{
21072106Computes the vector cosine similarity of a dense vector $b() with respect
21082107to each row $a(*,i) of a dense PDL $a(). This is basically the same
You can’t perform that action at this time.
0 commit comments