[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38874] ellipj should work for arrays with any
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #38874] ellipj should work for arrays with any number of dimensions |
Date: |
Fri, 03 May 2013 05:53:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12 |
URL:
<http://savannah.gnu.org/bugs/?38874>
Summary: ellipj should work for arrays with any number of
dimensions
Project: GNU Octave
Submitted by: jwe
Submitted on: Fri 03 May 2013 05:53:15 AM GMT
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: John W. Eaton
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
The new ellipj function looks like a 2 argument mapper, so is there any reason
that it is restricted to 2D arrays? It seems that it should handle arrays of
arbitrary dimensions as long as the sizes agree. I tagged this as a
compatibility item because that's what it looks like Matlab does. If not,
change this report to a feature request.
If so, then the loops should probably also be rewritten something like this,
which should be somewhat faster than using the () indexing operators because
the () indexing operators will check reference counts each time they are
called, but using fortran_vec will only require one reference count check.
Matrix u = u_arg.array_value ();
Matrix m = m_arg.array_value ();
NDArray sn (dims);
NDArray cn (dims);
NDArray dn (dims);
NDArray err (dims);
coust double *pu = u.data ();
coust double *pm = m.data ();
double *psn = sn.fortran_vec ();
double *pcn = cn.fortran_vec ();
double *pdn = dn.fortran_vec ();
double *perr = err.fortran_vec ();
for (octave_idx_type i = 0; i < nel; i++)
sncndn (pu[i], pm[i], psn[i], pcn[i], pdn[i], perr[i]);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38874>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #38874] ellipj should work for arrays with any number of dimensions,
John W. Eaton <=