Lsqfit

Latest version: v13.2.2

Safety actively analyzes 638720 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 13

4.8.1

===========================
Bug fix.

- fixed negative svdcuts (which one shouldn't use anyway), which were broken.

- gvar.cspline.CSpline functions now return scalars rather than 0-D numpy
arrays when given scalar arguments.

4.8

========================
This release has a reworked framework for SVD cuts. The new framework is
simpler, but also more robust --- SVD cuts are applied separately
to each block-diagonal sub-matrix of the data-prior covariance matrix. This
is more accurate, faster, and uses less memory, though the differences
aren't substantial for most fits.

- svdnum is no longer an option for lsqfit.nonlinear_fit, raniter, etc.
This parameter makes little sense in the new framework. Make svdcut
negative if it is important to get rid of certain eigenmodes. (Generally
it is better to keep the modes, but with larger variances. This is
what happens when svdcut is positive.)

- New information included in the Settings part of a fit report:
number of eigenmodes modified by SVD cut, time needed for fit.
The number of iterations is moved from the top line of the report
to the last line, with the time.

- Better notation for lsqfit.transform_p (mostly compatible with old
usage).

- Added a new numerical analysis routine (joining gvar.ode and gvar.cspline)
in gvar for manipulating power series representations of functions:
gvar.powerseries. The numerical analysis routines in gvar have been
adapted so that they work with GVars and/or floats. More will be added
in the future.

- Fixed bug in gvar.cspline (derivatives not computed correctly); added
better tests for cspline.

- Fixed documentation errors in gvar.dataset.

- gvar.dataset.avg_data(s) for a dictionary s now (optionally) issues
a warning if different entries in s have different sample sizes. The
smallest sample size is chosen for all entries in such situations.

- Added option to gvar.ode.Integrator to allow custom adaptive
strategies. Also offers a different interface to the integrator.

- Fixed minor irregularity (not really a bug) in GVar.fmt:
x = gvar(0.999,0.999) implied that x.fmt(2) gave 1.00(100) which
is correct but non-standard (should be 1.00(1.00) and now is).

4.7

==============
A minor upgrade but with one backwards incompatible change (that is unlikey
to affect much code). The incompatibility is the main reason for calling this
release version 4.7 rather than 4.6.2.

- GVars can be used with any comparison operator now (==, !=, >, >=, <, <=).
The comparison is made with the mean value of the GVar, ignoring the
standard deviation. This is to facilitate the use/design of numeric functions
that are designed to work with either floats or GVars. The definition of ==
and != has changed from the past. Before x==y for two GVars was true only if
both their means and standard deviations agreed; now it is true if their
means agree, but their standard deviations disagree.

- Can use keyword keys to specify the which keys to use and their order when
creating a BufferDict from a dictionary-like object.

- Significantly more documentation for the gvar module, and some rearrangement
and expansion of the overview documentation.

- New function gvar.gvar_function for creating new arithmetic Python
functions that can accept GVar arguments.

- gvar.gvar(x, xcov) now works when x and xcov are dictionaries. This allows
you to deconstruct a dictionary of GVars using gvar.mean and gvar.evalcov,
and then to reconstruct the dictionary using gvar.gvar: e.g.,
gvar.gvar(gvar.mean(g), gvar.evalcov(g)) rebuilds g when g is an array
of GVars, or a dictionary of GVars and arrays of GVars.

- gvar has two new numerical analysis modules: gvar.ode for integrating
ordinary differential equations, and gvar.cspline for creating cubic
splines from 1-d data. These modules are adapted from standard routines
so they work with GVars as well as floats, which is why they are included
here. Additional modules will be added as the need arises.

- When printing an lsqfit fit using fit.format(), setting option maxline=True
(rather than a number) now causes all data to be printed.

- Other minor rearrangements and clarifications in setup.py and a few other files.

4.6.1

===========================
Cleaning up some small bugs introduced with the new lsqfit.wavg. Also
introduced an approximate but potentially much faster *fast* mode for it.

4.6

========================
The main change here is an upgrade to lsqfit.wavg.

- Somewhat incompatible change in lsqfit.wavg: When averaging arrays or dicts,
wavg used to ignore correlations between different elements of the
array or dict. The new wavg takes account of all correlations between
different pieces of input data. wavg returns a GVar if averaging
a list of GVars, a numpy array of GVars if averaging a list of arrays
of GVars, and a Bufferdict of GVars or arrays of GVars if averaging
a list of dicts. In each case the return value has extra attributes:
chi2, dof, Q, time, fit. The function itself also has these attributes,
coming from the last fit.

- gvar.mean(g) now returns g unchanged if g contains objects of type
other than GVar. This is useful for writing functions that must work
with either GVars or floats as arguments: gvar.mean can be used to
strip the sdev off of GVars where it isn't needed or wanted.

- New function gvar.asbufferdict(g) converts dictionary g to a
BufferDict unless it already is one, in which case it returns g.
The keys in the final result can be restricted by adding a
a list of keys as a second argument: gvar.asbufferdict(g, keylist).

4.5.3

===========================

- Fixed bug in gvar._gvarcore that caused problems on win64 systems.

- GVar's __cinit__ has been changed to an __init__, which makes derivation
from GVar possible. GVar also has new property: g.internaldata.
This allows simplifies derivation from GVar --- see, for example,
class WAvg in lsqfit._extras.py. Finally a cython declaration file,
gvar.pxd, is installed for the benefit of other cython modules:
cimport gvar gives the module access to the internal definitions of
cython extension types GVar, svec and smat.

- lsqfit.wavg (weighted averages) now returns a variable
of type WAvg which is a class derived from GVar (with all of
its functionality) but with added attributes: chi2,
dof, and Q which are the chi2, dof, Q from the wavg. In the past these were
read off the function itself (eg, wavg.Q) but this is nonintuitive.
Now ans = lsqfit.wavg(list_of_GVars) is a GVar with the extra
attributes (ans.chi2, ans.dof, ans.Q). lsqfit.wavg still has attributes
chi2, Q etc to help with legacy code. Also this is useful if the average
is over a list of arrays or dictionaries (ie, a multidimensional random
variable). In this case the individual GVars in the result have chi2s, etc
as described above, while lsqfit.wavg has the chi2 for the entire set (ie,
the sum of the chi2s for all the components).

Page 10 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.