File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 11- allaxis*vals can now take 1-D ndarrays as start and endpoints
22- PP operation for inverse Transform::t_spherical
33- add PDL::Guide::NumPy doc (#361)
4+ - norm works inplace
45
562.103 2026-03-03
67- fix regression in *linvals so takes ndarrays as start and end again
Original file line number Diff line number Diff line change 414414
415415pp_def('norm',
416416 HandleBad => 1,
417+ Inplace => 1,
417418 Pars => 'vec(n); [o] norm(n)',
418419 GenericTypes => [ppdefs_all],
419420 Doc => 'Normalises a vector to unit Euclidean length
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ subtest hist => sub {
1414subtest norm => sub {
1515 my $x = pdl(' [[i 2+3i] [4+5i 6+7i]]' );
1616 is_pdl $x -> norm,
17- pdl(
17+ my $exp = pdl(
1818 [
1919 [ 0.267261 * i, 0.534522 + 0.801783 * i ],
2020 [ 0.356348 + 0.445435 * i, 0.534522 + 0.623609 * i ],
2121 ]
2222 ),
2323 ' native complex norm works' ;
24+ $x -> inplace-> norm;
25+ is_pdl $x , $exp , ' norm works inplace' ;
2426};
2527
2628subtest glue => sub {
You can’t perform that action at this time.
0 commit comments