octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8046] [octave forge] (nan): ranks functio


From: Nicholas Jankowski
Subject: [Octave-patch-tracker] [patch #8046] [octave forge] (nan): ranks function - add support for multi-D arrays
Date: Fri, 30 Jul 2021 16:18:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36

Follow-up Comment #1, patch #8046 (project octave):

it appears that the current nan package version (3.5.3) ranks function does
support nD arrays:


>> A = cat(3,randi(5,3,3),randi(5,3,3),randi(5,3,3));
>> B = cat(4,A,A);
>> pkg load nan

*snip shadow warnings*

>> ranks(B,3)
ans =

ans(:,:,1,1) =

   2.5000   2.0000   1.5000
   2.0000   1.0000   1.0000
   1.0000   2.0000   1.0000

ans(:,:,2,1) =

   2.5000   3.0000   1.5000
   3.0000   2.0000   2.0000
   2.5000   1.0000   2.0000

ans(:,:,3,1) =

   1.0000   1.0000   3.0000
   1.0000   3.0000   3.0000
   2.5000   3.0000   3.0000

ans(:,:,1,2) =

   2.5000   2.0000   1.5000
   2.0000   1.0000   2.0000
   1.0000   2.5000   1.0000

ans(:,:,2,2) =

   2.5000   3.0000   1.5000
   3.0000   2.0000   2.0000
   2.5000   1.0000   2.5000

ans(:,:,3,2) =

   1.0000   1.0000   3.0000
   1.0000   3.0000   2.0000
   2.5000   2.5000   2.5000


patch likely can be closed.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?8046>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]