-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCHANGES.txt
1600 lines (1217 loc) · 64.5 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Version 13.1.5 2025-01-31
=========================
Fixes error in pxd files introduced by last update.
Version 13.1.4 2025-01-31
=========================
Cleaned up Cython code. Updated __init__.pxd no longer cimports numpy.
It now also includes msum_gvar and wsum_gvar (for lsqfit).
Version 13.1.3 2024-12-05
=========================
Fixes incompatibility with numpy2 in gvar.bootstrap_iter.
Version 13.1.2 2024-11-23
==========================
Fix to pyproject.toml.
Version 13.1.1 2024-07-06
==========================
Modified so that it works with numpy>=2.0.
Version 13.1 2024-05-21
========================
- Improvements to gvar.PDFStatistics, including new keywords
fits, errorbars for PDFStatistics.plot_histogram.
- gvar.PDFHistogram deprecated.
Version 13.0.1 and 13.0.2 2024-03-05
=====================================
- Fixes default arguments for sample and raniter.
- Move gvar.pxd to correct place.
Version 13.0 2024/03/04
========================
- gvar.PDF is completely rewritten to increase functionality for use by the
vegas and lsqfit modules. The changes are incompatible with previous versions.
- Substantial extensions to gvar.PDFStatistics for use in lsqfit.vegas_fit. Adds
a fit to a continuous split-normal distribution to the histogram analysis.
Introduces an incompatibility because the attributes of a PDFStatistics
have different names. Adds plotting capability.
- bd = gvar.BufferDict(d, keys=[k1, k2, ...]) copies d[k] into bd[k]
for every k in keys that is also in d. The results are now copied in the
order specified by keys.
- Fixes a bug in gvar.BufferDict.all_keys that in certain situations included
the same key twice.
- Adds BufferDict.lbatch_buf and BufferDict.rbatch_buf for extracting batch buffers
from batch BufferDicts.
- Fixes bug in gvar.BufferDict.all_keys which caused crashes when keys
were not strings.
- Fixes inconsistencies in gvar.SVD when svdcut=0.0.
Version 12.1 2023-12-04
========================
- Adds batch capability to gvar.sample and gvar.raniter so samples can
be created in large batches, which is much more efficient if large
numbers of samples are needed. Also adds similar capability to
gvar.BufferDict when making clones. These changes are useful
for (fast) Monte Carlo simulations: see the section on Sampling GVars
in the tutorial.
- Updates use of numpy's random module to conform with changes in
numpy version 1.17. See the documentation for :func:`gvar.ranseed`.
- New case study (on Creating an Integrator) that illustrates how to
repurpose an existing library function to accommodate GVars.
- The import time for gvar is greatly reduced, especially if numpy has
already been loaded.
- Simplifies gvar.__version__ (no longer uses importlib.metadata, which is buggy
and increases gvar's import time significantly).
- Minor fixes to GVar.set, GVar.__format__, evalcov, evalcov_blocks,
evalcov_blocks_dense, and gvar.dataset.avg_data (when median=unbias=True).
Version 12.0 2023-11-01
===========================
Introduces more modern string formatting for GVars, including support for
the e, f and g formats used to format floats. For more details see the section
on "Formatting GVars for Printing and Display" in the GVar documentation.
The default format is somewhat different from before.
Version 11.11.17 2023-10-12
============================
Fixes obscure bug on Windows machines when evalcov_blocks(g) is called with a
single GVar g. The tests should now work on Windows machines.
Version 11.11.16 2023-10-11
============================
Identical to previous version but now offers Python wheels for installation.
Version 11.11.15 2023-09-27
============================
Tweak to the new build instructions introduced in 11.11.14.
Version 11.11.14 2023-09-27
=============================
- Adds numpy.import_array() to Cython files for Cython3.
- Changes the build instructions in pyproject.toml to deal with
incompatibilities between different versions of numpy.
- Adds unbias option to dataset.avg_data().
Version 11.11.13 2023-08-27
=============================
Bug fix to forbid distribution function names in BufferDict.add_distribution()
that contain parentheses (which would cause problems if allowed).
Version 11.11.12 2023-07-22
===========================
Bug fixes to make code compatible with Cython v3.0 and numpy v1.25.
Version 11.11.11 2023-06-11
============================
- Minor error in gvar.powerseries.PowerSeries.__truediv__ that triggered
exception when it shouldn't have.
- Fixes bug that caused a crash when old pickle files containing GVars
were read in. Note that pickling GVars directly is generally not
a great idea; use gvar.dump and gvar.load instead of pickle.load/dump.
Version 11.11.10 2023-05-11
===========================
- New and much simpler installation code. Works with Python3.11, even if
numpy is not installed.
- Fix readthedocs setup.
Version 11.11.2 2023-02-26
==========================
Cleans up inconsistent treatment of data types by gvar.BufferDict.
Version 11.11.1 2022-11-11
===========================
- Fixes 2 minor bugs in gvar.dump/load.
Version 11.11 2022-11-02
==========================
Mostly bug fixes.
- Fixes bug causing gvar.var to crash under certain circumstances
when one or more arguments are not a GVars.
- Fixes pickling of GVars using pickle.dump/load. Added warning that
using pickle.dump/load loses the correlations between GVars.
To preserve correlations use gvar.load/dump instead.
- Fixed bug in pickling of BufferDicts (didn't capture distributions properly).
- Forces Cython to regenerate *.c files when using Python 3.11 or later (deals
with incompatibilities introduced by 3.11).
- gvar.load/dump add support for classes with __slots__.
Version 11.10.1 2022-08-01
===========================
- Fixes bug that prevented gvar.gvar(x, cov) from using
a read-only covariance matrix cov.
- Fixes a bug in BufferDict.uniform which allowed
incorrect arguments to cripple BufferDict. The
incorrect arguments now raise exceptions.
Version 11.10 2022-05-12
=========================
Adds the possibility of phasing the construction of a set
of correlated GVars. gvar(ymean, ycov, x, xycov) returns
primary GVars y that have covariance matrix ycov and
covariance matrix xycov with previously defined
primary GVars x. The first and third arguments
(ymean and x) are 1-d arrays; the other two are
2-d arrays.
Version 11.9.7 2022-05-01
==========================
Thanks to Giacomo Petrillo for these ideas and issues.
- Fixes bug in raniter when svdcut<0.
- Fixes var, sdev, evalcorr when given [] as an argument -- ie,
they no longer crash.
- More legible __str__ and __repr__ for BufferDict. Thanks to
Giacomo Petrillo for the code.
- New iterator all_keys() for BufferDict which iterates over
the dictionary keys and the extension keys. Thanks again to
Giacomo Petrillo for code.
Version 11.9.6 2022-03-13
==========================
Fixes bug in BufferDict.del_distribution that caused it to crash. Also
adds more protection to BufferDict.add_distribution. Adds new
static method BufferDict.has_distribution.
Version 11.9.5 2021-12-13
===========================
- Fixes issue with Python 3.10.
- New keyword (keys) in gvar.tabulate.
Version 11.9.4 2021-09-06
==========================
Bug fix in evalcov_blocks for problem in Windows installations.
Version 11.9.3 2021-08-14
==========================
- Very minor bug fix to gvar.erf and new implementation.
- Bug fix for graphics in PDFHistogram.
- Minor optimizations.
Version 11.9.2 2021-04-15
=========================
- Bug fix in evalcov to get rid of (unusual) divide-by-0 error.
Thanks to Giacomo Petrillo for pointing out the problem.
- New keywords for correlate: upper, lower, verify. These
make it easier to build the correlation matrix from an
upper or lower matrix, and to verify (optionally) the
final GVars.
Version 11.9.1 2020-11-25
=========================
Yet another tweak to gvar.dataset.avg_data(dataset). This makes
it a bit faster for very large problems and avoids a bug
in scipy's sparse matrix code when the covariance
matrix has more than 2**31 elements.
Version 11.9 2020-11-22
========================
- Further fixes to gvar.dataset.avg_data(dataset). The previous
fix (in v11.8) could lead to problems for dictionary datasets
where entries dataset[k] have different sample sizes. The new
version has a new keyword (mismatch) that offers three options
for dealing with this situation.
- Several functions (eg, gvar.var) generated segmentation errors if GVars
in the arguments were replaced by None. This has been fixed. What happens
in such cases depends on the function, but segmentation faults should
not happen.
Version 11.8 2020-11-15
=======================
Small upgrade to support feature request: dataset.avg_data(dataset) no longer
discards data when dataset is a dictionary whose entries have different
sample sizes. It used to truncate entries that had more samples (by
discarding from the end) so that all entries had the same (smallest)
sample size.
Also added keyword uniform to raniter.
Version 11.7 2020-07-17
========================
- Adds support for multivariate power series to gvar.powerseries, as well
as minor bug fixes. Adds error function (erf(powerseries)).
- Adds new numerical analysis module for Pade approximants of functions.
Version 11.6 2020-06-11
========================
- gvar.regulate is a new tool for regulating singularities
in correlation matrices. It has two regulation schemes,
one tailored for Cholesky decompositions of the
correlation matrix (eps), and the other using an
SVD decomposition (svdcut). The Cholesky/eps scheme is
typically a bit faster, but is less robust numerically.
The SVD scheme uses gvar.svd. The Cholesky implementation
is based on a recommendation from Giacomo Petrillo.
- Keyword add_svdnoise in gvar.svd has been replaced by keyword noise.
The old keyword still works, however (for legacy code).
- gvar.chi2, gvar.raniter, gvar.bootstrap_iter now have the option
of specifying either eps or svdcut (passed on to gvar.regulate).
- More efficient implementations of gvar.sdev and gvar.var.
Version 11.5.2 2020-05-09
==========================
Fix documentation problems introduced in 11.5.1.
Version 11.5.1 2020-05-09
==========================
More tuning of evalcov, for better performance on dense matrices of
size 15x15 or larger. Also improved doc-strings for Cython-generated
functions.
Version 11.5 2020-05-06
========================
Significant performance upgrades to evalcov and evalcov_blocks,
especially for large systems.
- Fixes an inefficiency in gvar.evalcov_blocks that was introduced in v11.4.
- New optimization in gvar.evalcov for large, dense covariance matrices.
The improvement can be as large as a factor of 3-4 speedup for matrices
larger than (roughly) 200x200. Suggested by Giacomo Petrillo.
Version 11.4 2020-04-29
=======================
Significant rewrite of gvar.evalcov_blocks(g), making it much
faster (thanks to Giacomo Petrillo for the suggestion). Also
gvar.gvar(x,cov) has new keywords: verify and fast. See
documentation.
Version 11.2 2020-03-18
========================
Minor fixes and updates.
- Fixes (substantial) inefficiency in gvar.ode.Integrator. This was a coding
error that gave correct results but sometimes at a cost much larger than
necessary. Adds options hmax, maxstep to ode.Integrator.
- Adds gvar.abs. This is more less same as gvar.fabs, but unlike fabs works
for something like np.array([1., -2.], dtype=object). Treatment of GVars is
the same.
Versions 11.1 2020-03-01
==========================
Further upgrade to gvar.dump and gvar.load to allow
user-defined classes some control over how GVars
are removed and distributed. New functions are
available to help: gvar.remove_gvars and
gvar.distribute_gvars. These changes respond
to a feature request for the lsqfit module.
Version 11.0 2020-02-25
========================
Significant upgrade to gvar.dump and gvar.load, which now can
handle data structures that contain mixtures of GVars with
other data types, and that can include nested dictionaries, lists,
tuples, etc. The old versions (v10.1.2) of these
are still available as gvar.gdump and gvar.gload.
The new versions of dump/load are much more flexible, but
unlike the old versions only work with pickle (not json)
as the serializer; there is no longer a "method" keyword.
gdump/gload still offer a choice between pickle and json.
Other additions: gvar.dependencies, gvar.missing_dependencies,
and gvar.filter.
Version 10.1.2 2020-02-24
==========================
Fixes bug introduced into dump in version 10.1 (with thanks to
Andre Walker-Loud for pointing it out).
Version 10.1.1 2020-02-23
=========================
Fixes minor bug/inefficiency in gvar.dependencies and gvar.dump.
Version 10.1 2020-02-22
=========================
Significant improvement to gvar.dump/load and some new functions.
All changes are backwards compatible. Note that this code
still works with Python 2.7 (as well as Python 3.X, of course)
but it seems likely this will not continue far into
the future, as developers for the several packages
used by gvar abandon Python2, now that it is formally
discontinued.
- New versions of gvar.dump and gvar.dumps that can preserve
dependencies between derived and primary GVars (to allow, for
example, the construction of error budgets). Update for
pickling of gvar.BufferDicts.
- New function gvar.qqplot() for making QQ-plots.
- Slight modification of gvar.chi2() to support
implementation of gvar.qqplot().
- New function gvar.is_primary(g) to determine whether GVars
are primary or derived. Also gvar.GVar.is_primary(). Also
new function gvar.dependencies for collecting relevant
primary GVars.
- Function gvar.deriv(g, x) now works for an array x of GVars
(not just a single GVar). Also gvar.GVar.deriv(x).
- Fixed bug (that caused crashes) in (undocumented) low-level
gvar.gvar() usage.
Version 10.0.3 2020-02-07
=========================
Changed default string representation used when
printing GVars so that it always shows all
significant digits in the mean. This was
not the case before when answers were
very accurate.
Version 10.0.2 2020-02-03
=========================
Bug fix so that gvar.cspline.CSpline works with only 2 knots.
Version 10.0.1 2020-02-03
=========================
Bug fix for Windows users (thanks to Christoph Gohlke).
Version 10.0 2020-02-02
=======================
New features and improvements to existing features.
There are incompatible changes in gvar.loads and
gvar.cspline.CSpline, though most old code should
still run.
- gvar.cspline.CSpline has been reimplemented. It now supports
different algorithms (select using keyword alg) and the
default algorithm is a monotonic spline rather than a
classical cubic spline.
- Adds support in gvar.BufferDict for uniform distributions: see
gvar.BufferDict.uniform. This is for use by lsqfit.
- gvar.load() and gvar.dump() use a new protocol (for serializing
GVars) that make them substantially more efficient for large
problems. gvar.load() can read files created with the
old protocol, but if you want to update the format used
in an old file, load it and dump it again:
dump(load('filename'), 'filename'). gv.loads() no longer
has a method keyword since the method is inferred from
the data.
- Pickle format used for BufferDicts is changed but the new code
can handle data from pervious versions.
- New option (compress) for gvar.evalcov_blocks().
Version 9.2.1 2019-12-04
========================
- Fixes bugs in gvar.load and gvar.dump caused by recent security upgrades
to pyYAML.
Version 9.2 2019-05-08
========================
- gvar.dataset.svd_diagnosis has new keyword process_dataset that
allows it to be used in more general contexts.
- Fixes bug that prevented Dataset from reading compressed files
in Python 3.
Version 9.1 2019-03-19
=========================
Minor update.
- Simple arithmetic is now supported for BufferDicts having the same layout.
- Much improved the heuristic used in gvar.dataset.svd_diagnosis to suggest
an svdcut. The new heuristic gives lower estimates usually. Also has a new
option for the input data. And fixed bug that occasionally caused crashes.
- Adds new option (add_svdnoise) to gvar.svd. This is primarily for use
by lsqfit. Also modifies the return value to contain information related
to the SVD cut (dof, nblocks, ...) (instead of storing that information in
gvar.svd itself, which is a bad idea).
- New convenience function gvar.sample(g), which is the same as
next(gvar.raniter(g)).
Version 9.0.3 2018-10-03
========================
Very minor update.
- Fixes small inefficiency in installation script.
- Small optimization for cloning BufferDicts.
- load and loads now able to load files dumped using versions of
gvar older than 8.4. The old format is different.
Version 9.0.2 2018-08-03
========================
- Fixes bug in evalcov_blocks that missed out correlations in certain
unusual situations. This affects svd.
- Fixes incompatibility with latest numpy.
Version 9.0.1 2018-08-01
=========================
Fixes bug in BufferDict that made certain types of dictionary key fail.
Version 9.0 2018-07-27
=========================
Introduces new BufferDicts that are mostly but not completely compatible with
the old. The incompatible differences are in obscure features that were mostly
unused.
- BufferDicts reimplemented to give them more conventional/consistent
dictionary behavior. Also have added functionality to support
(limited) non-Gaussian distributions. Better documentation for
BufferDicts.
- Internal data type ExtendedDict is now gone because BufferDict can
provide the needed functionality in a much more robust (and simple)
fashion.
Version 8.5.1 2018-07-21
========================
Very minor fixes.
- Small improvement to gvar.chi2(...).
- Default svdcut changed to 1e-12 everywhere.
Version 8.5 2018-07-21
======================
Very minor enhancement.
- gvar.linalg.lstsq now supports both weighted and unweighted least squares
for solving a @ x = b when b has a covariance matrix.
Version 8.4 2018-07-15
======================
- New functions eigh, svd, lstsq added to gvar.linalg. Also have a faster
version of solve.
- gvar.load and gvar.dump now work with yaml as well as with pickle and json.
Version 8.3.7 2018-07-08
========================
Bug fixes.
- Bug fix in evalcov_blocks() that affects some Windows installations
(mismatched integer types in cython code).
- Bug fix for ode to deal with 0(0)/0(0) fringe case.
- Minor documentation fixes.
- Bug fix in GVar.__richcmp__ for Python 2.7 on macOS 10.13.5.
- Default svdcut=1e-15 added to raniter. Having a small non-zero
svdcut is standard elsewhere in code.
- Improved handling of cython in makefile.
Version 8.3.6 2018-03-18
============================
Minor update to keep up with changes in numpy.
Version 8.3.5 2018-02-15
========================
- More improvements for setup.py.
Version 8.3.4 2018-02-15
=========================
- New setup.py that: a) does not require cython; b) works even if
numpy is not installed (by installing numpy before it is required).
Previous versions of setup.py did not work unless cython and numpy
were already installed. This version uses setuptools to install
numpy and, optionally, cython before they are used to build gvar.
cython is not used by default; to turn it on set USE_CYTHON=True in
setup.py.
- Fixed formatting bug in gvar.fmt_errorbudget().
- Modifications to support hosting documentation by ReadTheDocs.
- Minor bug (error message) in gvar.Histogram.
Version 8.3.3 2017-08-03
=========================
Fixes typo in gvar.correlate that makes gvar compilation fail on some
machines.
Version 8.3.2 2017-06-22
=========================
json support in gvar.dump, gvar.load, etc was not quite right in v8.3.1 and so
was unreliable. The situation is improved here. Note that these functions are
meant to extend and improve on gvar.BufferDict.dump, etc which functions are
still available but will get limited support going forward.
Version 8.3.1 2017-06-16
==========================
A very minor updata:
- gvar.dump, gvar.load, etc can now use json instead of pickle
for serializing collections of GVars. pickle is probably more
robust.
- bug fix in evalcorr to deal with very rare condition that caused
the routine to crash (condition caused by std dev = 0.0 for a GVar).
Version 8.3 2017-06-03
======================
Bug fixes and a little bit of new functionality.
- A new utility gvar.dataset.svd_diagnosis() analyzes a dataset
containing Monte Carlo results for multiple variables to determine
whether or not an SVD cut is needed for the correlation matrix
describing these variables. The smallest eigenvalues of a correlation
matrix can be badly underestimated when the number of
Monte Carlo samples is insufficiently large. This makes the correlation
matrix more singular than it should be, which can lead to problems,
for example, when trying to fit the correlated data. This utility
estimates the size of the svd cut to use on the correlation matrix.
A new case study illustrates its use.
- Fix plotting by PDFHistogram.make_plot to account for (incompatible)
change introduced in matplotlib-2.0.0's pyplot.bar.
- gvar.dataset.bin_data(xx) returns a gvar.dataset.Dataset ordered
dictionary if xx is a dictionary.
- pickle now works for (the mostly hidden classes) gvar.svec and gvar.smat
and therefore for x.internaldata where x is a GVar. Tricky to use
internaldata, however.
Version 8.2.3 2017-04-30
==========================
- Slightly faster memory allocation for GVars.
- Fixed problems in gvar.BufferDict caused by changes in Python's
dictionaries starting at Python 3.5. The new code has been tested
(and should work) with Python 3.4, 3.5 and 3.6.
Version 8.2.2 2017-03-17
=========================
Minor/rare bug fixes:
- SVD(mat, rescale=True) works now when mat has a zero on the diagonal. Such
a zero is a very unusual occurrence so this fix will have no impact
on almost all codes. This repairs a bug introduced in v8.1.
- GVars whose mean or standard deviation are nans will no longer cause
an exception when they are printed. Thanks to Daniel Hackett.
Version 8.2.1 2017-02-11
=========================
- Fixed bug in gvar.gvar that mishandled GVars with standard
deviation exactly equal to 0, when they were in arrays. This
caused segmentation faults occasionally.
- Tiny fix to Dataset for use with hdf5 files.
Version 8.2 2017-02-06
========================
Very small changes, mostly to support other modules.
- gvar.dataset.Dataset can now read from files that use hdf5 format.
- del g[k] and g.get(k) now implemented for any BufferDict g.
- Can specify buffer data type when creating a BufferDict from
a dictionary or list of tuples: g = BufferDict(d, dtype=object).
- Fixed small bug in gvar.tabulate (headers=False didn't work).
Version 8.1 2017-01-09
===========================
Mostly internal changes needed by other code.
- Improved internal treatment of sparse covariance matrices in
gvar.svd (more sparse now). This involved improvements in svec and smat,
which now look for and remove entries that are 0; and it involved a new
function evalcov_blocks that constructs the non-zero block diagonals of the
covariance matrix (as opposed to the entire matrix, which is what evalcov
does). This should lead to small speedups but also greatly reduce memory
consumption in cases where evalcov was used to construct covariance matrices
for large numbers of GVars (eg, lsqfit).
- Two new convenience functions: cov(g1,g2) which is evalcov([g1,g2])[0,1]
and corr(g1,g2) which returns evalcorr([g1,g2])[0,1].
- gvar.ranseed now accepts single integers, as well as lists of
integers, as an argument.
- New low-level routines gvar.disassemble and gvar.reassemble
that should be used with care.
- changed gvar.chi2() so its output can be formatted with
gvar.fmt_chi2().
Version 8.0 2016-11-05
=======================
This is a small change but one that is not compatible with previous
versions. I accidently introduced a circular import when adding
PDFIntegrator to gvar. PDFIntegrator has to be part of the vegas
module, not the gvar module. So gvar.PDFIntegrator needs to be
replaced by vegas.PDFIntegrator in existing code. This is the only
change and is irrelevant if you are not using module vegas together
with gvar (or lsqfit).
There are also some internal changes to correct data-type mismatches
on windows machines.
Version 7.3.1 2016-08-17
==========================
This is a very small change to the new PDFIntegrator class (new as of
v7.3) that results in much improved performance for very high dimensions
(eg, integrating over 100 variables). PDFIntegrator has a way of
pre-adapting the integrator during initialization, so that it is almost
fully adapted to the PDF. This has little impact for low-dimension
integrals (eg, 3 variables) but can make a huge difference for
very-high-dimension integrals, causing them to work for much smaller
values of neval. This feature is actually in the v7.3 code but was
accidentally left unactivated. This is merely an optimization.
The only other correction is a small, behind-the-scenes improvement
in PDFStatistics.
Version 7.3 2016-08-14
========================
New features include PDFIntegrator for integrating over PDFs and the
ability to read compressed files in gvar.Dataset. Several bug fixes as well.
- New class PDFIntegrator for evaluating expectation values weighted
by the probability density function (PDF) for arbitrary multi-dimensional
Gaussian distributions. This class uses the vegas module to evaluate
the multi-dimensional integrals, and optimizes the integrands for vegas.
vegas uses adaptive Monte Carlo integration and so can handle fairly
high-dimension integrals (dim=10, 20, 50 ...) efficiently. The vegas
module must be installed separately. Three other modules are provided
in addition: PDF, PDFStatistics and PDFHistogram. See the section
on "Non-Gaussian Expectation Values" in the tutorial for an example.
- gvar.Dataset can now read gzipped and bzipped files. It looks for .gz
and .bz2 at the ends of file names to identify which files are
compressed.
- Made gvar.gvar(a, sd) substantially faster (30%) when a is a large array.
Replaced a Python list by a numpy array -- corrects an oversight from
before. This probably won't have a big effect on most codes since
gvar creation is usually a small part of the cost.
- Bug fixes in gvar.powerseries that make it work better with
coefficients that are numpy arrays.
- Bug fixes in gvar.cspline when spline is used outside of its range,
with extrap_order set to 0, 1 or 2. The array size returned
by the spline function (or derivatives) was not always correct.
Additional test code.
- Small change in BufferDict to help with legacy code issues.
- BufferDict(d) for d=dictionary no longer stores keys in sorted order. This
never made sense but also causes trouble in python3 when keys of mixed type
are used.
Version 7.2 2015-08-10
=======================
- Fixed error in evalcov(g) and evalcorr(g) when g is a dictionary.
The return values are doubly indexed dictionaries c[i,j] whose
values correspond to g[i] and g[j]. The shape of c[i,j] is
an array whose shape is the sum of the shapes of g[i] and g[j],
where scalars are treated as shape=(1,) objects. Also evalcorr(g) worked
incorrectly when elements g[k] were arrays.
- Added correlate(g, corr) which takes a set of uncorrelated GVars in g
and adds correlations as specified by correlation matrix corr. It is
common for people to publish correlated data as a set of means and
standard deviations, plus a correlation matrix. This routine
facilitates converting such data into GVars.
- Minor corrections to documentation and improved testing for evalcov
and evalcorr.
Version 7.1 2015-07-24
=========================
- Added gvar.tabulate(g) for tabulating values stored in arrays or
dictionaries of GVars.
- Fixed typos in the tutorial.
- Documentation fix in gvar.BufferDict.
Version 7.0.3 2015-06
=========================
- fixed default initialization of gvar.ranseed so it doesn't generate
errors due to new restrictions on numpy's random generator.
Version 7.0.2 - 2015-06-17
===========================
Changed to pip + distutils for installation. Fixed inconsistencies in
INSTALLATION.txt.
Version 7.0.1 - 2015-06-16
==========================
Had to replace setuptools with distutils again, because I could not get cython
pxd files to work properly with the eggs, causing build problems for
lsqfit.
Version 7.0 - 2015-06-16
==========================
The biggest change in this version is that gvar is now distributed
independently of lsqfit; it will no longer be bundled with the latter. This
is better because gvar is used by packages other than lsqfit. There are also
two very minor but incompatible changes, in the interfaces for gvar.chi2 and
gvar.ode, that require the major version number to increase from 6 to 7
(because of semantic versioning). Finally there are some significant
additions to the numerical analysis routines provided with gvar.
- The first incompatible change concerns a rarely used feature
of gvar.chi2. Previous versions stored information about dof and Q in
as attributes of the function; these are now stored in the result of the
function, which is much more natural.
- The second incompatible change is in gvar.ode. The behavior when the
step size is reduced below hmin is changed. Before an exception was
issued and execution stopped. Now a warning is issued, the step size
is not reduced and execution continues. The warning is necessary since
it means that errors may not be under control to the extent hoped.
- Added gvar.ode.integral for 1d integrals.
- Added two new numerical analysis packages to gvar:
gvar.root - finds roots of 1d functions
gvar.linalg - basic linear algebra (det, inv, solve, eigvalsh ...)
As for the other numerical analysis methods, the new methods work with any
combination of numbers and GVars.
- gvar.cspline now allows you to specify what order polynomial is used for
out-of-range points. In the past a cubic polynomial was used, based on
the value and derivatives at the knot nearest to the out-of-range point.
Now one can specify a lower-order polynomial by setting parameter
extrap_order equal to 0, 1, or 2.
- Added gvar.equivalent(g1, g2, rtol, atol) which checkes whether or not
the GVars in g1 and g2 are the equivalent (ie, g.mean and g.der agree
for each GVar). This is useful for debugging purposes.
- Installation will now use setuptools instead of disutils, provided
setuptools is installed. setuptools automatically ensures that
modules needed by gvar are installed and sufficiently
up-to-date. If setuptools is not installed, distutils is used and
dependencies are not checked --- this must be done by hand.
- Tiny addition to gvar tests.
Version 6.0 - 2014-11-01
========================
This upgrade deals with some issues created by the most recent update to
numpy (v1.9.0). The verion number increases to 6 because a (very minor) part
of the gvar.powerseries interface had to change (and therefore by the rules of
semantic versioning one must increase the major verion number). BufferDicts
are also subtly changed, though in a way that shouldn't affect much code.
A couple of enhancements are included as well.
- gvar.BufferDicts are now derived from collections.OrderedDict. This is
a consequence of the numpy change, but it is probably a good idea anyway.
The interface is the same but pickling has changed. This means that
BufferDicts pickled with the old software cannot be unpickled with
the new. A very minimal module, oldbufferdict.py, is included in lsqfit
for converting old pickled data to the new format; see documentation
inside the file. Data stored using json is unaffected.
- The power series coefficents of gvar.powerseries.PowerSeries variable
p are now accessed via attribute c: p.c[0], p.c[1] etc. Formerly one
could access the coefficients using array notation --- p[0] for p.c[0],
etc --- but this no longer works with numpy. The old notation was a bad
idea in any case.
- gvar.fmt_errorbudget has a new option called verify. Set verify=True
to have the code check that the error budget is complete and has no
double counting of errors; a warning is issued if this is not the case.
- Added arctan2 to the list of functions that work with GVars,
using code from Matt Wingate. (NB, the documentation shows how to
create additional functions (eg, erf(x)) using gvar_function.)
- Obscure bug fix in gvar.ode.Integrator allows GVars as the
independent variables.
- Rearranged documentation now includes case studies. These are self
contained examples that are extensively annotated (and relatively simple).
There are only two at the moment but more are forthcoming.
Version 5.0.1 - 2014-09-13
===========================
This is a very minor bug fix.
- Modified gvar.mean(g), gvar.sdev(g), gvar.var(g) so that g can
include elements that are not GVars. These elements are assumed to
have zero error, so their value is their mean. This means, for
example, that g can be all GVars or all floats or a mixture.
- Fixed bug in gvar.ranseed which caused it to crash under python3 in
certain circumstances.
Version 5.0 - 2014-06-26
=========================
A minor upgrade to provide functionality for other libraries. The first
change is not backwards compatible, but is unlikely to break much or any
code (except mine).
- fit.svdcorrection is now the sum of all svdcorrections, not a vector. The
sum is all that is needed to construct error budgets, which is the
only use for fit.svdcorrection. The sum is easier to manipulate -- for
example, two svdcorrections can now be added to give a composite
svdcorrection (as opposed to concatenated before).
- Fixed innocuous bug in lsqfit.nonlinear_fit.format().
- gvar.dataset.Dataset.slice can now apply slices to multiple dimensions.
- Added __format__ to gvar.GVar. This converts the GVar to a string
and then applies the format to the string. This was needed to make
python3 and python2 function similarly in certain situations.
- More polishing of the documentation (especially about svd).
- Beginning with this version of lsqfit, version numbers will be consistent
with the rules of "semantic versioning" (http://semver.org). The most
important consequence is that any change that is *not* backwards compatible
with the current interface (as defined by the documentation) will be signaled
by a change in the major version number, where the full version number has the
format major.minor.patch (so the major version number is 5 for version 5.0).
A side effect of this is that increases in the major version number can
be triggered by relatively obscure changes in the interface that will have
no effect whatsoever on almost all existing codes. The current move to 5.0
is an example.
Version 4.8.5.1 - 2014-05-30
============================
This release is almost identical to the previous release. It is mainly to do
with getting the software registered properly online.
- Small improvement to the user interface in gvar.ode. It now works with
vectors of x values, returning vectors of y values.
Version 4.8.5 - 2014-05-29
==========================
- Bug fix so recent changes in lsqfit don't cause crashes on Windows systems.
Version 4.8.4 - 2014-05-23
===========================
Small bug fixes.
- gvar.dataset.Dataset objects now work with Python's pickle. Also
Dataset objects can now be initialized from other Dataset object, or from
dictionaries, or lists of key-data tuples (like dictionaries).
- lsqfit.wavg now works with priors.
- Removed calls to C's lgamma function because it isn't available to
old C compilers. Use Python's math.lgamma instead, which should always be
available.
Version 4.8.3 - 2014-05-21
==========================
Bug fix: the new svd system didn't work with older versions of numpy (earlier
than 1.8). It now does. The problem was in lsqfit; gvar was fine.
There was a related issue in gvar.cspline which is also fixed.
Version 4.8.2 - 2014-05-16
==========================
Very small additions to facilitate pickling and other serialization of GVars. Changed
gvar.evalcov and gvar.gvar so that newg = gvar.gvar(gvar.mean(g), gvar.evalcov(g))
for some array or dictionary g containing GVars creates a new array/dictionary
with the same means and covariance matrix. Added better documentation
on the gvar page about pickling gvars, and also added new functions
(dump, dumps, load, loads) for pickling collections of GVars.
Version 4.8.1 - 2014-05-14
===========================