Interface Changes for the naginterfaces Python Package¶
This page lists backwards-incompatible API changes in naginterfaces up to and including version 30.2.0.0.
Interfaces Changes in version 28.2.0.0¶
opt
- Optimization¶
Solver
naginterfaces.library.opt.handle_solve_ipopt()
now requires the return vector from its Hessian callback to be updated in place.Old definition:
def hess(x, idf, sigma, lamda, nnzh, inform): hx = foo return hx, inform
New definition:
def hess(x, idf, sigma, lamda, hx, inform): hx[:] = foo return inform
Also in this solver, length argument
nnzu
has been dropped and the (optional) multipliersu
have been added on input for use in a future release. The size of the returned arrayu
will match that supplied foru
on input, or be zero if it was not present.Old call:
handle_solve_ipopt(handle, x, nnzu, objfun=...)
New call:
u = np.empty(nnzu) handle_solve_ipopt(handle, x, objfun=..., u=u)
Solver
naginterfaces.library.opt.handle_solve_bxnl()
now requires the vectorrdx
from itslsqgrd
callback to be updated in place.Old definition:
def lsqgrd(x, nres, rdx, inform): rdx = foo return rdx, inform
New definition:
def lsqgrd(x, nres, rdx, inform): rdx[:] = foo return inform
Interfaces Changes in version 27.3.0.0¶
opt
- Optimization¶
Argument
hx
in callbacklsqhes
innaginterfaces.library.opt.handle_solve_bxnl()
is now to be modified in place.Old definition:
def lsqhes(x, lamda, inform): hx = something return hx, inform
New definition:
def lsqhes(x, lamda, hx, inform): hx[:, :] = something return inform
Interfaces Changes in version 27.1.0.0¶
anova
- Analysis of Variance¶
Values for the maximum number of treatment means to be computed and the maximum number of terms in the analysis of variance table are now computed internally in
naginterfaces.library.anova.factorial()
.Old call:
factorial(y, lfac, nblock, inter, irdf, mterm, maxt)
New call:
factorial(y, lfac, nblock, inter, irdf)
correg
- Correlation and Regression Analysis¶
Argument
x
innaginterfaces.library.correg.coeffs_kspearman_overwrite()
andnaginterfaces.library.correg.coeffs_kspearman_miss_case_overwrite()
is now modified in place on the right-hand side of the function call.Sample old call:
x, rr = coeffs_kspearman_overwrite(x, itype)
New call:
rr = coeffs_kspearman_overwrite(x, itype)
dot
- Inner Products¶
Redundant size and step arguments in
naginterfaces.library.dot.real_prec()
andnaginterfaces.library.dot.complex_prec()
have been removed.Sample old call:
real_prec(a[::2], b, len(a[::2]), 1, 1, c1, c2, sw)
New call:
real_prec(a[::2], b, c1, c2, sw)
glopt
- Global Optimization¶
The return value of
naginterfaces.library.glopt.bnd_mcs_option_check()
is now abool
.Old call:
if bnd_mcs_option_check('Some Option', comm) == 1: ...
New call:
if bnd_mcs_option_check('Some Option', comm): ...
matop
- Matrix Operations, Including Inversion¶
Output array
w
innaginterfaces.library.matop.real_gen_sparse_lu()
has been replaced by a single scalarincrease
which records the growth value of the computed factorization.Old call:
fac = real_gen_sparse_lu(...) increase = fac.w[0]
New call:
fac = real_gen_sparse_lu(...) increase = fac.increase
mip
- Operations Research¶
The interface for
naginterfaces.library.mip.iqp_dense()
has been improved.Old call:
iqp_dense(a, bl, bu, cvec, h, intvar, istate, xs, strtgy, comm, qphess=...)
New call:
iqp_dense(bl, bu, h, intvar, xs, strtgy, comm, a=a, cvec=cvec, istate=istate, qphess=...)
in which optionality has been activated for
a
,cvec
andistate
and where the returnedax
is nowNone
when there were no linear constraints.
mv
- Multivariate Methods¶
Optionality has been improved in
naginterfaces.library.mv.multidimscal_ordinal()
.Old call:
multidimscal_ordinal(typ, d, x, itera, iopt, ...)
New call:
multidimscal_ordinal(d, x, typ=typ, itera=itera, iopt=iopt, ...)
omp
- OpenMP Utilities¶
The return value of
naginterfaces.library.omp.get_nested()
,naginterfaces.library.omp.in_parallel()
andnaginterfaces.library.omp.using_threaded_impl()
is now abool
.Sample old call:
if in_parallel() == 1: ...
New call:
if in_parallel(): ...
opt
- Optimization¶
Some callbacks in
naginterfaces.library.opt.handle_solve_bounds_foas()
,naginterfaces.library.opt.handle_solve_dfls()
and have modified signatures with respect to theinform
argument.Sample old call:
objfun = lambda x, _nres: fx handle_solve_dfls(...)
New call:
objfun = lambda x, _nres, inform: (fx, inform) handle_solve_dfls(...)
Solver
naginterfaces.library.opt.handle_solve_ipopt()
also now requires return vectors from its gradient callbacks to be updated in place.Old call:
objfun = lambda x: fx objgrd = lambda x, _nnzfd: fdx confun = lambda x, _ncnln: gx congrd = lambda x, _nnzgd: gdx handle_solve_ipopt(...)
New call:
objfun = lambda x, inform: (fx, inform) def objgrd(x, fdx, inform): fdx[:] = [...] return inform confun = lambda x, _ncnln, inform: (gx, inform) def congrd(x, gdx, inform): gdx[:] = [...] return inform handle_solve_ipopt(...)
Please refer to one of the specific documents to confirm a routine’s new interface.
Argument
objfun
is now optional innaginterfaces.library.opt.handle_solve_dfno()
.Old call:
handle_solve_dfno(handle, objfun, x, ...)
New call:
handle_solve_dfno(handle, x, objfun=objfun, ...)
Argument
maxcal
is now optional innaginterfaces.library.opt.lsq_uncon_quasi_deriv_comp()
.Old call:
lsq_uncon_quasi_deriv_comp(m, selct, lsqfun, maxcal, ..., lsqmon=None, ...)
New call:
lsq_uncon_quasi_deriv_comp(m, selct, lsqfun, ..., maxcal=maxcal, lsqmon=None, ...)
The interfaces for
naginterfaces.library.opt.lp_solve()
,naginterfaces.library.opt.lsq_lincon_solve()
andnaginterfaces.library.opt.qp_dense_solve()
have been improved.For
naginterfaces.library.opt.lp_solve()
; old call:lp_solve(nclin, a, bl, bu, cvec, istate, x, comm, io_manager=None)
New call:
lp_solve(bl, bu, x, comm, a=a, cvec=cvec, istate=istate, io_manager=None)
in which optionality has been activated for
a
,cvec
andistate
,nclin
is now inferred froma
, and where the returnedax
is nowNone
when there were no linear constraints.For
naginterfaces.library.opt.lsq_lincon_solve()
; old call:lsq_lincon_solve(c, bl, bu, cvec, istate, kx, x, a, b, comm, io_manager=None)
New call:
lsq_lincon_solve(bl, bu, x, comm, c=c, cvec=cvec, istate=istate, kx=kx, a=a, b=b, io_manager=None)
in which optionality has been activated for
c
,cvec
,istate
,kx
,a
andb
, and where the returnedb
is nowNone
is some situations.For
naginterfaces.library.opt.qp_dense_solve()
; old call:qp_dense_solve(nclin, a, bl, bu, cvec, h, istate, x, comm, qphess=None, data=None, io_manager=None)
New call:
qp_dense_solve(bl, bu, h, x, comm, a=a, cvec=cvec, qphess=None, istate=istate, data=None, io_manager=None)
in which optionality has been activated for
a
,cvec
andistate
,nclin
is now inferred froma
, and where the returnedax
is nowNone
when there were no linear constraints.
pde
- Partial Differential Equations¶
In the DAE solvers
naginterfaces.library.pde.dim1_parab_dae_fd()
,naginterfaces.library.pde.dim1_parab_dae_coll()
,naginterfaces.library.pde.dim1_parab_dae_keller()
,naginterfaces.library.pde.dim1_parab_convdiff_dae()
,naginterfaces.library.pde.dim1_parab_convdiff_remesh()
,naginterfaces.library.pde.dim1_parab_remesh_fd()
andnaginterfaces.library.pde.dim1_parab_remesh_keller()
the keyword arguments for configuring the sizes of workspaces used when sparse matrix methods are requested have been renamed and now have more descriptive defaults (0
).Sample old call:
dim1_parab_dae_coll(..., lrsave=lrsave, lisave=lisave, ...)
New call:
dim1_parab_dae_coll(..., lrsave_estim=lrsave, lisave_estim=lisave, ...)
quad
- Quadrature¶
Argument
nagcal
has been removed fromnaginterfaces.library.quad.dim1_gen_vec_multi_rcomm()
. Its inclusion was erroneous and the argument had no effect.Old call:
dim1_gen_vec_multi_rcomm(..., comm, nagcal)
New call:
dim1_gen_vec_multi_rcomm(..., comm)
rand
- Random Number Generators¶
Reference vector
r
innaginterfaces.library.rand.multivar_normal()
,naginterfaces.library.rand.multivar_students_t()
,naginterfaces.library.rand.times_garch_asym1()
,naginterfaces.library.rand.times_garch_asym2()
,naginterfaces.library.rand.times_garch_exp()
,naginterfaces.library.rand.times_garch_gjr()
andnaginterfaces.library.rand.times_smooth_exp()
has been promoted to a communication structure. Consequently, the structure will now be initialized for you if you pass in an empty dict, and is modified in place.Sample old calls:
mode = 0 r_n = np.empty((m*(m+1) + 1)) r_n, _ = multivar_normal(mode, n, df, xmu, c, r_n, statecomm) ...
or
mode = 0 r_t = np.empty((m*(m+1) + 2)) r_t, _ = multivar_students_t(mode, n, df, xmu, c, r_t, statecomm) ...
New calls:
mode = 0 comm_n = {} multivar_normal(mode, n, df, xmu, c, comm_n, statecomm) ... mode = 0 comm_t = {} multivar_students_t(mode, n, df, xmu, c, comm_t, statecomm) ...
sparse
- Large Scale Linear Systems¶
Many of the input arguments in
naginterfaces.library.sparse.real_gen_precon_ilu()
andnaginterfaces.library.sparse.complex_gen_precon_ilu()
have been made optional.Sample old call:
real_gen_precon_ilu( nnz, a, irow, icol, lfill, dtol, milu, ipivp, ipivq, pstrat=pstrat, )
New call:
real_gen_precon_ilu( nnz, a, irow, icol, n=?, lfill=lfill, dtol=dtol, milu=milu, ipivp=?, ipivq=?, pstrat=pstrat, )
The new optionality of the pivot arrays
ipivp
andipivq
means that if they are omitted thenn
, the order of the matrix , must be supplied instead.The weight array is now optional in
naginterfaces.library.sparse.real_gen_basic_solver()
andnaginterfaces.library.sparse.complex_gen_basic_solver()
.Sample old call:
real_gen_basic_solver(irevcm, u, v, wgt, comm)
New call:
real_gen_basic_solver(irevcm, u, v, comm, wgt=wgt)
Many of the input arguments in
naginterfaces.library.sparse.real_gen_basic_setup()
have been made optional.Old call:
real_gen_basic_setup( method, precon, n, m, tol, maxitn, anorm, sigmax, monit, norm=norm, weight=weight, iterm=iterm, )
New call:
real_gen_basic_setup( n, method=method, precon=precon, m=m, tol=tol, maxitm=maxitn, anorm=anorm, sigmax=sigmax, monit=monit, norm=norm, weight=weight, iterm=iterm, )
Many of the input arguments in
naginterfaces.library.sparse.complex_gen_basic_setup()
have been made optional.Additionally,
lwork
andlwreq
have been dropped from this routine and also fromnaginterfaces.library.sparse.real_symm_basic_setup()
andnaginterfaces.library.sparse.complex_herm_basic_setup()
.An old call sequence of the form
lwreq, comm = complex_gen_basic_setup(method, ..., lwork, ...) if lwork < lwreq: _, comm = complex_gen_basic_setup(method, ..., lwreq, ...)
should be updated to
comm = complex_gen_basic_setup( n, method=method, precon=precon, m=m, tol=tol, maxitm=maxitn, anorm=anorm, sigmax=sigmax, monit=monit, norm=norm, weight=weight, iterm=iterm, )
sparseig
- Large Scale Eigenproblems¶
Argument
mb
is now required to be zero-sized when the standard eigenvalue problem is being solved innaginterfaces.library.sparseig.real_symm_band_solve()
. (This is the default mode of operation.)Old call:
comm = {} # The default problem form: real_symm_option('Standard', comm) ... mb = np.empty((2*kl+`ku`+1, n)) real_symm_band_solve(..., mb, ...)
New call:
comm = {} real_symm_option('Standard', comm) ... mb = np.empty((0, n)) real_symm_band_solve(..., mb, ...)
tsa
- Time Series Analysis¶
Reference vector
r
innaginterfaces.library.tsa.uni_smooth_exp()
has been promoted to a communication structure. Consequently, the structure will now be initialized for you if you pass in an empty dict, and is modified in place.Old call:
mode = 0 r = np.empty(13 + (0 if itype in (1, 2, 3) else p)) e = uni_smooth_exp(mode, itype, p, param, y, k, init, nf, r) r = e.r ...
New call:
mode = 0 comm = {} e = uni_smooth_exp(mode, itype, p, param, y, k, init, nf, comm) ...
Argument
l
has been dropped fromnaginterfaces.library.tsa.multi_kalman_sqrt_invar()
.Old call:
multi_kalman_sqrt_invar(transf, l, a, b, ...)
New call:
multi_kalman_sqrt_invar(transf, a, b, ...)
Interfaces Changes in version 27.0.0.0¶
Cross-Chapter Changes¶
‘Diagnostic channel’ arguments have been removed.
The following table lists the affected routines and the name of the corresponding removed argument.
Routine name
Argument
nout
nout
nout
nout
nout
nadv
nadv
nadv
nadv
nadv
nout
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nadv
nout
lp
nadv
nadv
nadv
lp
nadv
A previous call of the form
m = FileObjManager() f = some_file_object m.register((f,)) nag_solver(..., nadv=m.unit_from_fileobj(f), io_manager=m)
is equivalent in the new scheme to
m = FileObjManager() f = some_file_object m.register_to_advunit(f) nag_solver(..., io_manager=m)
The previous form for output relying on the default association of the advisory unit
m = FileObjManager() nag_solver(..., nadv=m.advunit, io_manager=m)
is now performed via
m = FileObjManager() nag_solver(..., io_manager=m)
For calls in the old regime in which output from different solvers was directed to different file objects:
m = FileObjManager() f1 = some_file_object f2 = another_file_object m.register((f1,f2)) nag_solver_a(..., nadv=m.unit_from_fileobj(f1), io_manager=m) nag_solver_b(..., nadv=m.unit_from_fileobj(f2), io_manager=m)
use two I/O managers instead:
m1 = FileObjManager() f1 = some_file_object m1.register_to_advunit(f1) m2 = FileObjManager() f2 = another_file_object m2.register_to_advunit(f2) nag_solver_a(..., io_manager=m1) nag_solver_b(..., io_manager=m2)
Some ‘result’ return values have been given more-meaningful names.
In the cases listed below this affects the name of the attribute in the function’s return tuple and/or in the
return_data
attribute on any warning raised by the function: for example, a call of the formsoln = quad.dim1_fin_well([...]) definite_integral = soln.result
in the new scheme must be converted to
soln = quad.dim1_fin_well([...]) definite_integral = soln.din
The following table lists the new names. In all cases the old name was
result
:Routine name
New attr. name
div
sdiv
gofs
errnrm
din
lambw
ez
erfcz
tx
shx
chx
e1x
gx
lgx
ecx
k1
f
p
k
f21
p
p
pint
x
x
x
x
x
x
invlan
p
p
p
p
ts
outl
Some user-supplied function arguments have been renamed to
f
.This affects calls to the routines listed below in which you pass the given function as a named keyword argument: for example, a call of the form
sum.invlaplace_crump(fun=my_f, [...])
must be converted to
sum.invlaplace_crump(f=my_f, [...])
The following table lists the old affected names. In all cases the new name is
f
.Routine name
Old arg. name
fun
fun
fun
functn
functn
functn
fun
fun
Improved identification of argument optionality has resulted in the following arguments becoming optional (and hence perhaps moving to a different position in the argument list). Please refer to the specific document for a given routine to see the new interface.
Routine name
Argument(s)
comm
pec
chi
option
option
iwrk
confun
a
,start
,confun
a
,confun
q
q
select
select
select
select
z
vl
,vr
select
,vl
,vr
select
,vl
,vr
select
,vl
,vr
select
,vl
,vr
selctg
selctg
selctg
selctg
selctg
selctg
select
,vl
,vr
select
,vl
,vr
select
,vl
,vr
select
,vl
,vr
af
,ipiv
,r
,c
a
,d
,confun
mip.iqp_dense
qphess
mip.iqp_sparse
qphx
fbnd
output
,g
output
,g
pederv
,output
,g
jac
jac
jac
jac
jac
jac
jac
g
jacobf
,jacobg
,jaceps
,jacgep
eqn
,constr
,prsol
idxc
,c
,a
,irowa
,iccola
,h
,irowh
,iccolh
,intvar
qphess
qphx
qphx
,c
idxc
,c
,irowh
,icolh
,h
idxfd
bl
,bu
,irowb
,icolb
,b
bl
,bu
,irowgd
,icolgd
irowh
,icolh
irowrd
,icolrd
blksizea
objfun
,objgrd
,confun
,congrd
,hess
u
,uc
,ua
confun
,istate
,clamda
,r
confun
,objfun
a
,confun
confun
pdedef
odedef
odedef
odedef
pdedef
,odedef
odedef
odedef
pdedef
,odedef
region
ipop
comm
comm
comm
comm
comm
comm
comm
comm
move
mask
sinit
sinit
sinit
piv
lx
blas
- Linear Algebra Support Routines¶
Arguments
m
andk
have been dropped fromnaginterfaces.library.blas.dgemm()
.Old call:
dgemm(transa, transb, m, k, alpha, ...)
New call:
dgemm(transa, transb, alpha, ...)
Argument
m
has been dropped fromnaginterfaces.library.blas.dlange()
.Old call:
dlange(norm, m, a)
New call:
dlange(norm, a)
blgm
- Linear Model Specification¶
A new argument
what
has been added tonaginterfaces.library.blgm.lm_submodel()
for controlling the labels that are to be produced.An old call, in which
hform
was produced bynaginterfaces.library.blgm.lm_formula()
, of the formlm_submodel(hform, [...])
must be converted to
lm_submodel('S', hform, [...])
Additionally, some error exits have been renumbered as follows
Meaning
Old code
New code
Illegal
what
N/A
11
what
not valid for the suppliedhxdesc
N/A
12
hform
not initialized or corrupt11
21
hform
not a G22 handle generated bylm_formula
12
22
A variable name used when creating
hform
is not present inhxdesc
13
23
Model and design matrix not consistent (w.r.t. mean effect)
14
24
Model and design matrix not consistent (w.r.t. terms)
15
25
Model and design matrix not consistent (w.r.t. mean or main effect)
16
26
Model and design matrix not consistent (w.r.t. contrasts)
17
27
hxdesc
not initialized or corrupt21
31
hxdesc
not a G22 handle generated bylm_formula
22
32
Constraint violated for
lisx
and41
61
Constraint violated for
lplab
and71
81
lenlab
too small81
91
Constraint violated for
lvinfo
91
101
lisx
,lplab
orlvinfo
too small92
102
interp
- Interpolation¶
Argument
n
has been dropped fromnaginterfaces.library.interp.dim1_aitken()
.Old call:
dim1_aitken(a, b, n, x)
New call:
dim1_aitken(a, b, x)
Argument
n
has been dropped fromnaginterfaces.library.interp.dim1_everett()
.Old call:
dim1_everett(n, p, a)
New call:
dim1_everett(p, a)
Argument
lck
has been dropped fromnaginterfaces.library.interp.dim1_spline()
.Old call:
dim1_spline(x, y, lck)
New call:
dim1_spline(x, y)
lapackeig
- Least Squares and Eigenvalue Problems (LAPACK)¶
Output argument
work
innaginterfaces.library.lapackeig.dgesvd()
has been renamed toworkb
.This affects calls using namedtuple referencing on the output.
Old call:
soln = dgesvd([...]) foo = soln.work
New call:
soln = dgesvd([...]) foo = soln.workb
matop
- Matrix Operations, Including Inversion¶
Callback-termination flags
iflag
have been removed fromnaginterfaces.library.matop.complex_gen_matrix_cond_num()
,naginterfaces.library.matop.complex_gen_matrix_cond_usd()
,naginterfaces.library.matop.complex_gen_matrix_fun_num()
,naginterfaces.library.matop.complex_gen_matrix_fun_usd()
,naginterfaces.library.matop.complex_herm_matrix_fun()
,naginterfaces.library.matop.real_gen_matrix_cond_num()
,naginterfaces.library.matop.real_gen_matrix_cond_usd()
,naginterfaces.library.matop.real_gen_matrix_fun_num()
,naginterfaces.library.matop.real_gen_matrix_fun_usd()
andnaginterfaces.library.matop.real_symm_matrix_fun()
.The previous functionality is superseded by the
UserCallbackTerminate
mechanism. See also the User-supplied Function Arguments subsection.Old code of the form
f = lambda iflag, z: (iflag, F(z)) fa, iflag, imnorm = matop.real_gen_matrix_fun_num(a, f)
should be updated to become
f = lambda z: F(z) fa, imnorm = matop.real_gen_matrix_fun_num(a, f)
mip
- Operations Research¶
Argument
comm
has been dropped from the callbackqphess
innaginterfaces.library.mip.iqp_dense()
.Old signature:
qphess(jthcol, h, x, comm, data)
New signature:
qphess(jthcol, h, x, data)
ode
- Ordinary Differential Equations¶
Argument
mmax
has been added to the callbackguess
innaginterfaces.library.ode.bvp_coll_nlin_solve()
.Old signature:
guess(x, m, data)
New signature:
guess(x, m, mmax, data)
Argument
neq
has been dropped fromnaginterfaces.library.ode.ivp_stiff_interp()
.Old call:
ivp_stiff_interp(tsol, m, neq, comm)
New call:
ivp_stiff_interp(tsol, m, comm)
ysav
has been subsumed into a communication structure in themonitr
callback ofnaginterfaces.library.ode.ivp_stiff_exp_bandjac()
,naginterfaces.library.ode.ivp_stiff_exp_fulljac()
,naginterfaces.library.ode.ivp_stiff_exp_sparjac()
,naginterfaces.library.ode.ivp_stiff_imp_bandjac()
,naginterfaces.library.ode.ivp_stiff_imp_fulljac()
andnaginterfaces.library.ode.ivp_stiff_imp_sparjac()
.Old signature:
monitr(t, hlast, hnext, y, ydot, ysav, r, acor, imon, hmin, hmax, nqu, comm, data=None),
New signature:
monitr(t, hlast, hnext, y, ydot, comm, r, acor, imon, hmin, hmax, nqu, data=None)
Likewise, the same array has been transformed in the interpolators
naginterfaces.library.ode.ivp_stiff_c1_interp()
andnaginterfaces.library.ode.ivp_stiff_nat_interp()
.Old calls:
ivp_stiff_c1_interp(xsol, m, ysav, acor, x, nqu, hu, h, comm) ivp_stiff_nat_interp(xsol, m, ysav, neq, x, nqu, hu, h)
New calls:
ivp_stiff_c1_interp(xsol, m, comm, acor, x, nqu, hu, h) ivp_stiff_nat_interp(xsol, m, comm, neq, x, nqu, hu, h):
Argument
comm
has been dropped from the callbackmonit
innaginterfaces.library.ode.bvp_shoot_genpar_algeq()
.Old signature:
monit(istate, iflag, ifail1, p, f, pnorm, pnorm1, eps, d, comm, data)
New signature:
monit(istate, iflag, ifail1, p, f, pnorm, pnorm1, eps, d, data)
opt
- Optimization¶
Argument
mon
has been renamed tomonit
innaginterfaces.library.opt.handle_solve_dfls()
andnaginterfaces.library.opt.handle_solve_ipopt()
.This affects calls using named keyword arguments.
For example, the old call
handle_solve_ipopt([...], mon=my_monit, [...])
must be converted to
handle_solve_ipopt([...], monit=my_monit, [...])
Argument
cjac
innaginterfaces.library.opt.nlp1_solve()
has been made optional and hence it moves position in the argument list.Old call:
nlp1_solve(a, bl, bu, confun, objfun, istate, cjac, clamda, r, x, comm, ...)
New call:
nlp1_solve(a, bl, bu, confun, objfun, istate, clamda, r, x, comm, cjac=cjac, ...)
Argument
ncnln
has been dropped fromnaginterfaces.library.opt.lsq_gencon_deriv()
.Old call:
lsq_gencon_deriv(ncnln, a, bl, bu, y, confun, objfun, x, comm, ...)
New call:
lsq_gencon_deriv(a, bl, bu, y, confun, objfun, x, comm, ...)
Argument
comm
has been dropped from the callbackqphess
innaginterfaces.library.opt.qp_dense_solve()
.Old signature:
qphess(jthcol, h, x, comm, data)
New signature:
qphess(jthcol, h, x, data)
pde
- Partial Differential Equations¶
The DAE solvers
naginterfaces.library.pde.dim1_parab_dae_fd()
,naginterfaces.library.pde.dim1_parab_dae_coll()
,naginterfaces.library.pde.dim1_parab_dae_keller()
,naginterfaces.library.pde.dim1_parab_convdiff_dae()
,naginterfaces.library.pde.dim1_parab_convdiff_remesh()
,naginterfaces.library.pde.dim1_parab_remesh_fd()
andnaginterfaces.library.pde.dim1_parab_remesh_keller()
have gained keyword argumentslrsave
andlisave
that can be used to configure the sizes of workspaces used.Generally the routines are able to use initial estimates for the sizes which they compute internally. However, when sparse matrix methods are requested the initial estimates may be insufficient. The two new output arguments
lrsave_min
andlisave_min
allow programmatic access to better lower bounds that can now be passed back to the routines in subsequent calls.Argument
comm
has been dropped from the callbacknumflx
innaginterfaces.library.pde.dim1_parab_convdiff()
,naginterfaces.library.pde.dim1_parab_convdiff_dae()
andnaginterfaces.library.pde.dim1_parab_convdiff_remesh()
.Old signature in
dim1_parab_convdiff
:numflx(t, x, uleft, uright, ires, comm, data)
New signature in
dim1_parab_convdiff
:numflx(t, x, uleft, uright, ires, data)
Old signature in
dim1_parab_convdiff_dae
anddim1_parab_convdiff_remesh
:numflx(t, x, v, uleft, uright, ires, comm, data)
New signature in
dim1_parab_convdiff_dae
anddim1_parab_convdiff_remesh
:numflx(t, x, v, uleft, uright, ires, comm, data)
Likewise,
comm
has been dropped frominidom
innaginterfaces.library.pde.dim2_gen_order2_rectilinear()
as well.Old signature:
inidom(maxpts, ierr, comm, data)
New signature:
inidom(maxpts, ierr, data)
rand
- Random Number Generators¶
The population vector
ipop
is now optional innaginterfaces.library.rand.sample()
.To preserve prior operation
sample(ipop, m, statecomm)
it is now necessary to use
sample(m, statecomm, ipop=ipop)
Additional convenience now comes if the input population is , in which case
ipop
can be omitted andn
supplied instead; that is, an existing call of the formsample(list(range(1, n+1)), m, statecomm)
should become
sample(m, statecomm, n=n)
Note that it is not permitted to omit both
ipop
andn
in the new call.
roots
- Roots of One or More Transcendental Equations¶
A number of arguments have been made optional in
naginterfaces.library.roots.contfn_brent()
,naginterfaces.library.roots.contfn_brent_interval()
andnaginterfaces.library.roots.contfn_cntin()
.Old calls:
contfn_brent(a, b, eps, f, ...) contfn_brent_interval(x, h, eps, f, ...) contfn_cntin(x, eps, f, nfmax, ...)
New calls:
contfn_brent(a, b, f, eps=eps, ...) contfn_brent_interval(x, f, h=h, eps=eps, ...) contfn_cntin(x, f, nfmax=nfmax, eps=eps, ...)
sparse
- Large Scale Linear Systems¶
Argument
check
has been made optional innaginterfaces.library.sparse.complex_gen_matvec()
,naginterfaces.library.sparse.complex_gen_precon_ilu_solve()
,naginterfaces.library.sparse.complex_gen_precon_jacobi()
,naginterfaces.library.sparse.complex_gen_precon_ssor_solve()
,naginterfaces.library.sparse.complex_herm_matvec()
,naginterfaces.library.sparse.complex_herm_precon_ilu_solve()
,naginterfaces.library.sparse.complex_herm_precon_ssor_solve()
,naginterfaces.library.sparse.real_gen_matvec()
,naginterfaces.library.sparse.real_gen_precon_ilu_solve()
,naginterfaces.library.sparse.real_gen_precon_jacobi()
,naginterfaces.library.sparse.real_gen_precon_ssor_solve()
,naginterfaces.library.sparse.real_symm_matvec()
,naginterfaces.library.sparse.real_symm_precon_ichol_solve()
andnaginterfaces.library.sparse.real_symm_precon_ssor_solve()
.Example old call:
real_gen_precon_ilu_solve(..., idiag, check, y)
Example new call:
real_gen_precon_ilu_solve(..., idiag, y, check=check)
stat
- Simple Calculations on Statistical Data¶
Argument
rcomm
innaginterfaces.library.stat.summary_onevar()
is now modified in place on the right-hand side of the function call.A previous call sequence of the form
pn = 0 rcomm = [0.]*20 while ...: summary = summary_onevar(x, ..., pn=pn, rcomm=rcomm) pn = summary.pn rcomm = summary.comm
should be updated to be
pn = 0 rcomm = numpy.empty(20) while ...: summary = summary_onevar(x, ..., pn=pn, rcomm=rcomm) pn = summary.pn
sum
- Summation of Series¶
The signature for callback
f
innaginterfaces.library.sum.invlaplace_crump()
has been simplified.Old signature:
(fr, fi) = f(pr, pi, data=None)
New signature:
fp = f(p, data=None)
in which
p = complex(pr, pi)
andfp = complex(fr, fi)
.
tsa
- Time Series Analysis¶
Argument
npar
has been removed fromnaginterfaces.library.tsa.uni_arima_prelim()
.Old call:
uni_arima_prelim(mr, r, xv, npar)
New call:
uni_arima_prelim(mr, r, xv)
Argument
hp
innaginterfaces.library.tsa.uni_garch_asym1_estim()
has been renamed topht
.This affects calls using named keyword arguments.
Old call:
uni_garch_asym1_estim([...], hp=foo, [...])
New call:
uni_garch_asym1_estim([...], pht=foo, [...])
Argument
hp
innaginterfaces.library.tsa.uni_garch_asym2_estim()
has been renamed topht
.This affects calls using named keyword arguments.
Old call:
uni_garch_asym2_estim([...], hp=foo, [...])
New call:
uni_garch_asym2_estim([...], pht=foo, [...])
Argument
hp
innaginterfaces.library.tsa.uni_garch_gjr_estim()
has been renamed topht
.This affects calls using named keyword arguments.
Old call:
uni_garch_gjr_estim([...], hp=foo, [...])
New call:
uni_garch_gjr_estim([...], pht=foo, [...])
Argument
hp
innaginterfaces.library.tsa.uni_garch_exp_estim()
has been renamed topht
.This affects calls using named keyword arguments.
Old call:
uni_garch_exp_estim([...], hp=foo, [...])
New call:
uni_garch_exp_estim([...], pht=foo, [...])
Argument
sparam
is now returned as a rank-2 array fromnaginterfaces.library.tsa.cp_pelt()
andnaginterfaces.library.tsa.cp_binary()
whenctype
is not or .
wav
- Wavelet Transforms¶
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim1_sngl_fwd()
.Old call:
dim1_sngl_fwd(x, lenc, comm)
New call:
dim1_sngl_fwd(x, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim1_multi_fwd()
.Old call:
dim1_multi_fwd(x, lenc, nwl, comm)
New call:
dim1_multi_fwd(x, nwl, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim1_mxolap_fwd()
.Old call:
dim1_mxolap_fwd(x, lenc, comm)
New call:
dim1_mxolap_fwd(x, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim1_mxolap_multi_fwd()
.Old call:
dim1_mxolap_multi_fwd(x, keepa, lenc, nwl, comm)
New call:
dim1_mxolap_multi_fwd(x, keepa, nwl, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim2_multi_fwd()
.Old call:
dim2_multi_fwd(a, lenc, nwl, comm)
New call:
dim2_multi_fwd(a, nwl, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim3_sngl_fwd()
.Old call:
dim3_sngl_fwd(a, lenc, comm)
New call:
dim3_sngl_fwd(a, comm)
Argument
lenc
has been removed fromnaginterfaces.library.wav.dim3_multi_fwd()
.Old call:
dim3_multi_fwd(a, lenc, nwl, comm)
New call:
dim3_multi_fwd(a, nwl, comm)
zeros
- Zeros of Polynomials¶
Previously-split complex data which appeared as floats in various forms has been coalesced back to complex in the following routines.
Old call
zsm, zlg = quadratic_complex(ar, ai, br, bi, cr, ci)
New call
z_small, z_large = quadratic_complex(a, b, c)
in which
a = complex(ar, ai)
, and so on, andz_small = complex(zsm[0], zsm[1])
, etc.Old call
zsm, zlg = quadratic_real(a, b, c)
New call
z_small, z_large = quadratic_real(a, b, c)
in which
z_small = complex(zsm[0], zsm[1])
, and so on.Old call
zeror, zeroi, errest = quartic_real(e, a, b, c, d)
New call
zero, errest = quartic_real(e, a, b, c, d)
in which
zero = zeror + zeroi*1j
.Old call
zeror, zeroi, errest = quartic_complex(e, a, b, c, d)
New call
zero, errest = quartic_complex(e, a, b, c, d)
in which
zero = zeror + zeroi*1j
.Naming in
naginterfaces.library.zeros.poly_complex()
has been unified with other routines in the submodule.This affects calls using named keyword arguments.
Old call
poly_complex(ca=ca, scal=scal)
New call
poly_complex(a=ca, scal=scal)