1Ufunc(3) User Contributed Perl Documentation Ufunc(3)
2
3
4
6 PDL::Ufunc - primitive ufunc operations for pdl
7
9 This module provides some primitive and useful functions defined using
10 PDL::PP based on functionality of what are sometimes called ufuncs (for
11 example NumPY and Mathematica talk about these). It collects all the
12 functions generally used to "reduce" or "accumulate" along a dimension.
13 These all do their job across the first dimension but by using the
14 slicing functions you can do it on any dimension.
15
16 The PDL::Reduce module provides an alternative interface to many of the
17 functions in this module.
18
20 use PDL::Ufunc;
21
23 prodover
24 Signature: (a(n); int+ [o]b())
25
26 Project via product to N-1 dimensions
27
28 This function reduces the dimensionality of an ndarray by one by taking
29 the product along the 1st dimension.
30
31 By using xchg etc. it is possible to use any dimension.
32
33 $y = prodover($x);
34
35 $spectrum = prodover $image->transpose
36
37 prodover processes bad values. It will set the bad-value flag of all
38 output ndarrays if the flag is set for any of the input ndarrays.
39
40 cprodover
41 Signature: (a(n); cdouble [o]b())
42
43 Project via product to N-1 dimensions
44
45 This function reduces the dimensionality of an ndarray by one by taking
46 the product along the 1st dimension.
47
48 By using xchg etc. it is possible to use any dimension.
49
50 $y = cprodover($x);
51
52 $spectrum = cprodover $image->transpose
53
54 Unlike "prodover", the calculations are performed in complex double
55 precision.
56
57 cprodover processes bad values. It will set the bad-value flag of all
58 output ndarrays if the flag is set for any of the input ndarrays.
59
60 dprodover
61 Signature: (a(n); double [o]b())
62
63 Project via product to N-1 dimensions
64
65 This function reduces the dimensionality of an ndarray by one by taking
66 the product along the 1st dimension.
67
68 By using xchg etc. it is possible to use any dimension.
69
70 $y = dprodover($x);
71
72 $spectrum = dprodover $image->transpose
73
74 Unlike "prodover", the calculations are performed in double precision.
75
76 dprodover processes bad values. It will set the bad-value flag of all
77 output ndarrays if the flag is set for any of the input ndarrays.
78
79 cumuprodover
80 Signature: (a(n); int+ [o]b(n))
81
82 Cumulative product
83
84 This function calculates the cumulative product along the 1st
85 dimension.
86
87 By using xchg etc. it is possible to use any dimension.
88
89 The sum is started so that the first element in the cumulative product
90 is the first element of the parameter.
91
92 $y = cumuprodover($x);
93
94 $spectrum = cumuprodover $image->transpose
95
96 cumuprodover processes bad values. It will set the bad-value flag of
97 all output ndarrays if the flag is set for any of the input ndarrays.
98
99 dcumuprodover
100 Signature: (a(n); double [o]b(n))
101
102 Cumulative product
103
104 This function calculates the cumulative product along the 1st
105 dimension.
106
107 By using xchg etc. it is possible to use any dimension.
108
109 The sum is started so that the first element in the cumulative product
110 is the first element of the parameter.
111
112 $y = dcumuprodover($x);
113
114 $spectrum = dcumuprodover $image->transpose
115
116 Unlike "cumuprodover", the calculations are performed in double
117 precision.
118
119 dcumuprodover processes bad values. It will set the bad-value flag of
120 all output ndarrays if the flag is set for any of the input ndarrays.
121
122 sumover
123 Signature: (a(n); int+ [o]b())
124
125 Project via sum to N-1 dimensions
126
127 This function reduces the dimensionality of an ndarray by one by taking
128 the sum along the 1st dimension.
129
130 By using xchg etc. it is possible to use any dimension.
131
132 $y = sumover($x);
133
134 $spectrum = sumover $image->transpose
135
136 sumover processes bad values. It will set the bad-value flag of all
137 output ndarrays if the flag is set for any of the input ndarrays.
138
139 csumover
140 Signature: (a(n); cdouble [o]b())
141
142 Project via sum to N-1 dimensions
143
144 This function reduces the dimensionality of an ndarray by one by taking
145 the sum along the 1st dimension.
146
147 By using xchg etc. it is possible to use any dimension.
148
149 $y = csumover($x);
150
151 $spectrum = csumover $image->transpose
152
153 Unlike "sumover", the calculations are performed in complex double
154 precision.
155
156 csumover processes bad values. It will set the bad-value flag of all
157 output ndarrays if the flag is set for any of the input ndarrays.
158
159 dsumover
160 Signature: (a(n); double [o]b())
161
162 Project via sum to N-1 dimensions
163
164 This function reduces the dimensionality of an ndarray by one by taking
165 the sum along the 1st dimension.
166
167 By using xchg etc. it is possible to use any dimension.
168
169 $y = dsumover($x);
170
171 $spectrum = dsumover $image->transpose
172
173 Unlike "sumover", the calculations are performed in double precision.
174
175 dsumover processes bad values. It will set the bad-value flag of all
176 output ndarrays if the flag is set for any of the input ndarrays.
177
178 cumusumover
179 Signature: (a(n); int+ [o]b(n))
180
181 Cumulative sum
182
183 This function calculates the cumulative sum along the 1st dimension.
184
185 By using xchg etc. it is possible to use any dimension.
186
187 The sum is started so that the first element in the cumulative sum is
188 the first element of the parameter.
189
190 $y = cumusumover($x);
191
192 $spectrum = cumusumover $image->transpose
193
194 cumusumover processes bad values. It will set the bad-value flag of
195 all output ndarrays if the flag is set for any of the input ndarrays.
196
197 dcumusumover
198 Signature: (a(n); double [o]b(n))
199
200 Cumulative sum
201
202 This function calculates the cumulative sum along the 1st dimension.
203
204 By using xchg etc. it is possible to use any dimension.
205
206 The sum is started so that the first element in the cumulative sum is
207 the first element of the parameter.
208
209 $y = dcumusumover($x);
210
211 $spectrum = dcumusumover $image->transpose
212
213 Unlike "cumusumover", the calculations are performed in double
214 precision.
215
216 dcumusumover processes bad values. It will set the bad-value flag of
217 all output ndarrays if the flag is set for any of the input ndarrays.
218
219 andover
220 Signature: (a(n); int+ [o]b())
221
222 Project via and to N-1 dimensions
223
224 This function reduces the dimensionality of an ndarray by one by taking
225 the and along the 1st dimension.
226
227 By using xchg etc. it is possible to use any dimension.
228
229 $y = andover($x);
230
231 $spectrum = andover $image->transpose
232
233 If "a()" contains only bad data (and its bad flag is set), "b()" is set
234 bad. Otherwise "b()" will have its bad flag cleared, as it will not
235 contain any bad values.
236
237 bandover
238 Signature: (a(n); [o]b())
239
240 Project via bitwise and to N-1 dimensions
241
242 This function reduces the dimensionality of an ndarray by one by taking
243 the bitwise and along the 1st dimension.
244
245 By using xchg etc. it is possible to use any dimension.
246
247 $y = bandover($x);
248
249 $spectrum = bandover $image->transpose
250
251 If "a()" contains only bad data (and its bad flag is set), "b()" is set
252 bad. Otherwise "b()" will have its bad flag cleared, as it will not
253 contain any bad values.
254
255 borover
256 Signature: (a(n); [o]b())
257
258 Project via bitwise or to N-1 dimensions
259
260 This function reduces the dimensionality of an ndarray by one by taking
261 the bitwise or along the 1st dimension.
262
263 By using xchg etc. it is possible to use any dimension.
264
265 $y = borover($x);
266
267 $spectrum = borover $image->transpose
268
269 If "a()" contains only bad data (and its bad flag is set), "b()" is set
270 bad. Otherwise "b()" will have its bad flag cleared, as it will not
271 contain any bad values.
272
273 orover
274 Signature: (a(n); int+ [o]b())
275
276 Project via or to N-1 dimensions
277
278 This function reduces the dimensionality of an ndarray by one by taking
279 the or along the 1st dimension.
280
281 By using xchg etc. it is possible to use any dimension.
282
283 $y = orover($x);
284
285 $spectrum = orover $image->transpose
286
287 If "a()" contains only bad data (and its bad flag is set), "b()" is set
288 bad. Otherwise "b()" will have its bad flag cleared, as it will not
289 contain any bad values.
290
291 zcover
292 Signature: (a(n); int+ [o]b())
293
294 Project via == 0 to N-1 dimensions
295
296 This function reduces the dimensionality of an ndarray by one by taking
297 the == 0 along the 1st dimension.
298
299 By using xchg etc. it is possible to use any dimension.
300
301 $y = zcover($x);
302
303 $spectrum = zcover $image->transpose
304
305 If "a()" contains only bad data (and its bad flag is set), "b()" is set
306 bad. Otherwise "b()" will have its bad flag cleared, as it will not
307 contain any bad values.
308
309 intover
310 Signature: (a(n); float+ [o]b())
311
312 Project via integral to N-1 dimensions
313
314 This function reduces the dimensionality of an ndarray by one by taking
315 the integral along the 1st dimension.
316
317 By using xchg etc. it is possible to use any dimension.
318
319 $y = intover($x);
320
321 $spectrum = intover $image->transpose
322
323 Notes:
324
325 "intover" uses a point spacing of one (i.e., delta-h==1). You will
326 need to scale the result to correct for the true point delta).
327
328 For "n > 3", these are all "O(h^4)" (like Simpson's rule), but are
329 integrals between the end points assuming the pdl gives values just at
330 these centres: for such `functions', sumover is correct to O(h), but is
331 the natural (and correct) choice for binned data, of course.
332
333 intover ignores the bad-value flag of the input ndarrays. It will set
334 the bad-value flag of all output ndarrays if the flag is set for any of
335 the input ndarrays.
336
337 average
338 Signature: (a(n); int+ [o]b())
339
340 Project via average to N-1 dimensions
341
342 This function reduces the dimensionality of an ndarray by one by taking
343 the average along the 1st dimension.
344
345 By using xchg etc. it is possible to use any dimension.
346
347 $y = average($x);
348
349 $spectrum = average $image->transpose
350
351 average processes bad values. It will set the bad-value flag of all
352 output ndarrays if the flag is set for any of the input ndarrays.
353
354 avgover
355 Synonym for average.
356
357 caverage
358 Signature: (a(n); cdouble [o]b())
359
360 Project via average to N-1 dimensions
361
362 This function reduces the dimensionality of an ndarray by one by taking
363 the average along the 1st dimension.
364
365 By using xchg etc. it is possible to use any dimension.
366
367 $y = caverage($x);
368
369 $spectrum = caverage $image->transpose
370
371 Unlike average, the calculation is performed in complex double
372 precision.
373
374 caverage processes bad values. It will set the bad-value flag of all
375 output ndarrays if the flag is set for any of the input ndarrays.
376
377 cavgover
378 Synonym for caverage.
379
380 daverage
381 Signature: (a(n); double [o]b())
382
383 Project via average to N-1 dimensions
384
385 This function reduces the dimensionality of an ndarray by one by taking
386 the average along the 1st dimension.
387
388 By using xchg etc. it is possible to use any dimension.
389
390 $y = daverage($x);
391
392 $spectrum = daverage $image->transpose
393
394 Unlike average, the calculation is performed in double precision.
395
396 daverage processes bad values. It will set the bad-value flag of all
397 output ndarrays if the flag is set for any of the input ndarrays.
398
399 davgover
400 Synonym for daverage.
401
402 minimum
403 Signature: (a(n); [o]c())
404
405 Project via minimum to N-1 dimensions
406
407 This function reduces the dimensionality of an ndarray by one by taking
408 the minimum along the 1st dimension.
409
410 By using xchg etc. it is possible to use any dimension.
411
412 $y = minimum($x);
413
414 $spectrum = minimum $image->transpose
415
416 Output is set bad if all elements of the input are bad, otherwise the
417 bad flag is cleared for the output ndarray.
418
419 Note that "NaNs" are considered to be valid values; see isfinite and
420 badmask for ways of masking NaNs.
421
422 minover
423 Synonym for minimum.
424
425 minimum_ind
426 Signature: (a(n); indx [o] c())
427
428 Like minimum but returns the index rather than the value
429
430 Output is set bad if all elements of the input are bad, otherwise the
431 bad flag is cleared for the output ndarray.
432
433 minover_ind
434 Synonym for minimum_ind.
435
436 minimum_n_ind
437 Signature: (a(n); indx [o]c(m))
438
439 Returns the index of "m" minimum elements
440
441 Not yet been converted to ignore bad values
442
443 minover_n_ind
444 Synonym for minimum_n_ind.
445
446 maximum
447 Signature: (a(n); [o]c())
448
449 Project via maximum to N-1 dimensions
450
451 This function reduces the dimensionality of an ndarray by one by taking
452 the maximum along the 1st dimension.
453
454 By using xchg etc. it is possible to use any dimension.
455
456 $y = maximum($x);
457
458 $spectrum = maximum $image->transpose
459
460 Output is set bad if all elements of the input are bad, otherwise the
461 bad flag is cleared for the output ndarray.
462
463 Note that "NaNs" are considered to be valid values; see isfinite and
464 badmask for ways of masking NaNs.
465
466 maxover
467 Synonym for maximum.
468
469 maximum_ind
470 Signature: (a(n); indx [o] c())
471
472 Like maximum but returns the index rather than the value
473
474 Output is set bad if all elements of the input are bad, otherwise the
475 bad flag is cleared for the output ndarray.
476
477 maxover_ind
478 Synonym for maximum_ind.
479
480 maximum_n_ind
481 Signature: (a(n); indx [o]c(m))
482
483 Returns the index of "m" maximum elements
484
485 Not yet been converted to ignore bad values
486
487 maxover_n_ind
488 Synonym for maximum_n_ind.
489
490 minmaximum
491 Signature: (a(n); [o]cmin(); [o] cmax(); indx [o]cmin_ind(); indx [o]cmax_ind())
492
493 Find minimum and maximum and their indices for a given ndarray;
494
495 pdl> $x=pdl [[-2,3,4],[1,0,3]]
496 pdl> ($min, $max, $min_ind, $max_ind)=minmaximum($x)
497 pdl> p $min, $max, $min_ind, $max_ind
498 [-2 0] [4 3] [0 1] [2 2]
499
500 See also "minmax", which clumps the ndarray together.
501
502 If "a()" contains only bad data, then the output ndarrays will be set
503 bad, along with their bad flag. Otherwise they will have their bad
504 flags cleared, since they will not contain any bad values.
505
506 minmaxover
507 Synonym for minmaximum.
508
509 avg
510 Return the average of all elements in an ndarray.
511
512 See the documentation for "average" for more information.
513
514 $x = avg($data);
515
516 This routine handles bad values.
517
518 sum
519 Return the sum of all elements in an ndarray.
520
521 See the documentation for "sumover" for more information.
522
523 $x = sum($data);
524
525 This routine handles bad values.
526
527 prod
528 Return the product of all elements in an ndarray.
529
530 See the documentation for "prodover" for more information.
531
532 $x = prod($data);
533
534 This routine handles bad values.
535
536 davg
537 Return the average (in double precision) of all elements in an ndarray.
538
539 See the documentation for "daverage" for more information.
540
541 $x = davg($data);
542
543 This routine handles bad values.
544
545 dsum
546 Return the sum (in double precision) of all elements in an ndarray.
547
548 See the documentation for "dsumover" for more information.
549
550 $x = dsum($data);
551
552 This routine handles bad values.
553
554 dprod
555 Return the product (in double precision) of all elements in an ndarray.
556
557 See the documentation for "dprodover" for more information.
558
559 $x = dprod($data);
560
561 This routine handles bad values.
562
563 zcheck
564 Return the check for zero of all elements in an ndarray.
565
566 See the documentation for "zcover" for more information.
567
568 $x = zcheck($data);
569
570 This routine handles bad values.
571
572 and
573 Return the logical and of all elements in an ndarray.
574
575 See the documentation for "andover" for more information.
576
577 $x = and($data);
578
579 This routine handles bad values.
580
581 band
582 Return the bitwise and of all elements in an ndarray.
583
584 See the documentation for "bandover" for more information.
585
586 $x = band($data);
587
588 This routine handles bad values.
589
590 or
591 Return the logical or of all elements in an ndarray.
592
593 See the documentation for "orover" for more information.
594
595 $x = or($data);
596
597 This routine handles bad values.
598
599 bor
600 Return the bitwise or of all elements in an ndarray.
601
602 See the documentation for "borover" for more information.
603
604 $x = bor($data);
605
606 This routine handles bad values.
607
608 min
609 Return the minimum of all elements in an ndarray.
610
611 See the documentation for "minimum" for more information.
612
613 $x = min($data);
614
615 This routine handles bad values.
616
617 max
618 Return the maximum of all elements in an ndarray.
619
620 See the documentation for "maximum" for more information.
621
622 $x = max($data);
623
624 This routine handles bad values.
625
626 median
627 Return the median of all elements in an ndarray.
628
629 See the documentation for "medover" for more information.
630
631 $x = median($data);
632
633 This routine handles bad values.
634
635 mode
636 Return the mode of all elements in an ndarray.
637
638 See the documentation for "modeover" for more information.
639
640 $x = mode($data);
641
642 This routine handles bad values.
643
644 oddmedian
645 Return the oddmedian of all elements in an ndarray.
646
647 See the documentation for "oddmedover" for more information.
648
649 $x = oddmedian($data);
650
651 This routine handles bad values.
652
653 any
654 Return true if any element in ndarray set
655
656 Useful in conditional expressions:
657
658 if (any $x>15) { print "some values are greater than 15\n" }
659
660 See "or" for comments on what happens when all elements in the check
661 are bad.
662
663 all
664 Return true if all elements in ndarray set
665
666 Useful in conditional expressions:
667
668 if (all $x>15) { print "all values are greater than 15\n" }
669
670 See "and" for comments on what happens when all elements in the check
671 are bad.
672
673 minmax
674 Returns a list with minimum and maximum values of an ndarray.
675
676 ($mn, $mx) = minmax($pdl);
677
678 This routine does not broadcast over the dimensions of $pdl; it returns
679 the minimum and maximum values of the whole ndarray. See "minmaximum"
680 if this is not what is required. The two values are returned as Perl
681 scalars similar to min/max, and therefore ignore whether the values are
682 bad.
683
684 pdl> $x = pdl [1,-2,3,5,0]
685 pdl> ($min, $max) = minmax($x);
686 pdl> p "$min $max\n";
687 -2 5
688
689 medover
690 Signature: (a(n); [o]b(); [t]tmp(n))
691
692 Project via median to N-1 dimensions
693
694 This function reduces the dimensionality of an ndarray by one by taking
695 the median along the 1st dimension.
696
697 By using xchg etc. it is possible to use any dimension.
698
699 $y = medover($x);
700
701 $spectrum = medover $image->transpose
702
703 medover processes bad values. It will set the bad-value flag of all
704 output ndarrays if the flag is set for any of the input ndarrays.
705
706 oddmedover
707 Signature: (a(n); [o]b(); [t]tmp(n))
708
709 Project via oddmedian to N-1 dimensions
710
711 This function reduces the dimensionality of an ndarray by one by taking
712 the oddmedian along the 1st dimension.
713
714 By using xchg etc. it is possible to use any dimension.
715
716 $y = oddmedover($x);
717
718 $spectrum = oddmedover $image->transpose
719
720 The median is sometimes not a good choice as if the array has an even
721 number of elements it lies half-way between the two middle values -
722 thus it does not always correspond to a data value. The lower-odd
723 median is just the lower of these two values and so it ALWAYS sits on
724 an actual data value which is useful in some circumstances.
725
726 oddmedover processes bad values. It will set the bad-value flag of all
727 output ndarrays if the flag is set for any of the input ndarrays.
728
729 modeover
730 Signature: (data(n); [o]out(); [t]sorted(n))
731
732 Project via mode to N-1 dimensions
733
734 This function reduces the dimensionality of an ndarray by one by taking
735 the mode along the 1st dimension.
736
737 By using xchg etc. it is possible to use any dimension.
738
739 $y = modeover($x);
740
741 $spectrum = modeover $image->transpose
742
743 The mode is the single element most frequently found in a discrete data
744 set.
745
746 It only makes sense for integer data types, since floating-point types
747 are demoted to integer before the mode is calculated.
748
749 "modeover" treats BAD the same as any other value: if BAD is the most
750 common element, the returned value is also BAD.
751
752 modeover does not process bad values. It will set the bad-value flag
753 of all output ndarrays if the flag is set for any of the input
754 ndarrays.
755
756 pctover
757 Signature: (a(n); p(); [o]b(); [t]tmp(n))
758
759 Project via specified percentile to N-1 dimensions
760
761 This function reduces the dimensionality of an ndarray by one by taking
762 the specified percentile along the 1st dimension.
763
764 By using xchg etc. it is possible to use any dimension.
765
766 $y = pctover($x);
767
768 $spectrum = pctover $image->transpose
769
770 The specified percentile must be between 0.0 and 1.0. When the
771 specified percentile falls between data points, the result is
772 interpolated. Values outside the allowed range are clipped to 0.0 or
773 1.0 respectively. The algorithm implemented here is based on the
774 interpolation variant described at
775 <http://en.wikipedia.org/wiki/Percentile> as used by Microsoft Excel
776 and recommended by NIST.
777
778 pctover processes bad values. It will set the bad-value flag of all
779 output ndarrays if the flag is set for any of the input ndarrays.
780
781 oddpctover
782 Signature: (a(n); p(); [o]b(); [t]tmp(n))
783
784 Project via specified percentile to N-1 dimensions
785
786 This function reduces the dimensionality of an ndarray by one by taking
787 the specified percentile along the 1st dimension.
788
789 By using xchg etc. it is possible to use any dimension.
790
791 $y = oddpctover($x);
792
793 $spectrum = oddpctover $image->transpose
794
795 The specified percentile must be between 0.0 and 1.0. When the
796 specified percentile falls between two values, the nearest data value
797 is the result. The algorithm implemented is from the textbook version
798 described first at <http://en.wikipedia.org/wiki/Percentile>.
799
800 oddpctover processes bad values. It will set the bad-value flag of all
801 output ndarrays if the flag is set for any of the input ndarrays.
802
803 pct
804 Return the specified percentile of all elements in an ndarray. The
805 specified percentile (p) must be between 0.0 and 1.0. When the
806 specified percentile falls between data points, the result is
807 interpolated.
808
809 $x = pct($data, $pct);
810
811 oddpct
812 Return the specified percentile of all elements in an ndarray. The
813 specified percentile must be between 0.0 and 1.0. When the specified
814 percentile falls between two values, the nearest data value is the
815 result.
816
817 $x = oddpct($data, $pct);
818
819 qsort
820 Signature: (a(n); [o]b(n))
821
822 Quicksort a vector into ascending order.
823
824 print qsort random(10);
825
826 Bad values are moved to the end of the array:
827
828 pdl> p $y
829 [42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD]
830 pdl> p qsort($y)
831 [22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD]
832
833 qsorti
834 Signature: (a(n); indx [o]indx(n))
835
836 Quicksort a vector and return index of elements in ascending order.
837
838 $ix = qsorti $x;
839 print $x->index($ix); # Sorted list
840
841 Bad elements are moved to the end of the array:
842
843 pdl> p $y
844 [42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD]
845 pdl> p $y->index( qsorti($y) )
846 [22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD]
847
848 qsortvec
849 Signature: (a(n,m); [o]b(n,m))
850
851 Sort a list of vectors lexicographically.
852
853 The 0th dimension of the source ndarray is dimension in the vector; the
854 1st dimension is list order. Higher dimensions are broadcasted over.
855
856 print qsortvec pdl([[1,2],[0,500],[2,3],[4,2],[3,4],[3,5]]);
857 [
858 [ 0 500]
859 [ 1 2]
860 [ 2 3]
861 [ 3 4]
862 [ 3 5]
863 [ 4 2]
864 ]
865
866 Vectors with bad components are moved to the end of the array:
867
868 pdl> p $p = pdl("[0 0] [-100 0] [BAD 0] [100 0]")->qsortvec
869
870 [
871 [-100 0]
872 [ 0 0]
873 [ 100 0]
874 [ BAD 0]
875 ]
876
877 qsortveci
878 Signature: (a(n,m); indx [o]indx(m))
879
880 Sort a list of vectors lexicographically, returning the indices of the
881 sorted vectors rather than the sorted list itself.
882
883 As with "qsortvec", the input PDL should be an NxM array containing M
884 separate N-dimensional vectors. The return value is an integer M-PDL
885 containing the M-indices of original array rows, in sorted order.
886
887 As with "qsortvec", the zeroth element of the vectors runs slowest in
888 the sorted list.
889
890 Additional dimensions are broadcasted over: each plane is sorted
891 separately, so qsortveci may be thought of as a collapse operator of
892 sorts (groan).
893
894 Vectors with bad components are moved to the end of the array as for
895 "qsortvec".
896
898 Copyright (C) Tuomas J. Lukka 1997 (lukka@husc.harvard.edu).
899 Contributions by Christian Soeller (c.soeller@auckland.ac.nz) and Karl
900 Glazebrook (kgb@aaoepp.aao.gov.au). All rights reserved. There is no
901 warranty. You are allowed to redistribute this software / documentation
902 under certain conditions. For details, see the file COPYING in the PDL
903 distribution. If this file is separated from the PDL distribution, the
904 copyright notice should be included in the file.
905
906
907
908perl v5.34.0 2022-02-28 Ufunc(3)