We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e3f021 commit bbaa158Copy full SHA for bbaa158
lib/Math/DistanceFunctions/Native.rakumod
@@ -73,11 +73,11 @@ multi sub dot-product($v1, $v2 --> Numeric:D) {
73
#-----------------------------------------------------------
74
our proto sub norm(| --> Numeric:D) is export {*}
75
76
-multi sub norm(:v(:$vector)!, Str:D :p(:$type) --> Numeric:D) {
+multi sub norm(:v(:$vector)!, Str:D :p(:$type) = '2' --> Numeric:D) {
77
return norm($vector, :$type);
78
}
79
80
-multi sub norm($v, Str:D :p(:$type) --> Numeric:D) {
+multi sub norm($v, Str:D :p(:$type) = '2' --> Numeric:D) {
81
82
if !(($v ~~ Positional:D) && ($v.all ~~ Numeric:D)) {
83
die "The first argument is expected to be a numeric array.";
0 commit comments