help-octave
[Top][All Lists]
Advanced

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

Re: re: arrayfun on quaternion arrays


From: octavecontrib
Subject: Re: re: arrayfun on quaternion arrays
Date: Sun, 7 Jun 2020 17:08:00 +0530

This is probably failing because the quaternion objects don't implement the "numel" method correctly:
>> pkg load quaternion
>> qqq = [quaternion(1,0,0,0);
       quaternion(1,0,0,0);
       quaternion(2,0,0,0);];
>> numel(qqq)
ans =  1

I'd expect this to return 3 instead of 1.

Thank you.

The numel method in the @quaternion directory just redirects it to the builtin numel.
A test method inside the same file indicates that the package maintainer expected numel to be 1 even for arrays;
     The last line of the file @quaternion/numel is
     %! assert (numel (quaternion (eye (3))), 1);

I will contact the package maintainer for further details.
Regards,

reply via email to

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