Gtc

Latest version: v1.5.0

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

Scan your dependencies

Page 1 of 3

1.5.0

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

* Support for storing and retrieving :class:`~persistence.Archive` objects in XML is provided. Functions :func:`persistence.dump_xml`, :func:`persistence.dumps_xml`, :func:`persistence.load_xml`, and :func:`persistence.loads_xml` have been added to the :mod:`persistence` module.

* Support for using Python pickle to store and retrieve data from archives will be removed from GTC with the release of version 2.0. This means that :func:`persistence.load`, :func:`persistence.loads`, :func:`persistence.dumps`, and :func:`persistence.dump` will be no longer be available. Deprecation warnings have been added.

* A static copy-constructor method :func:`~persistence.Archive.copy` has been added for archives. This function duplicates the contents of another :class:`~persistence.Archive` object. The :func:`~persistence.Archive.copy` method can be used, for example, after an archive has been loaded from a deprecated record format. In that case, the loaded archive is not in a state that can be re-stored (in a different format); however, a copy generated by :func:`~persistence.Archive.copy` can be stored. This provides a mechanism to update archives stored in deprecated formats.

* XML and JSON schemas that describe the structure of archive serialisation records are provided. The schemas are stored in a subfolder (``/schema``) of the ``GTC`` installation.

1.4.1

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

* The straight-line regression functions that apply weights in :mod:`type_a` now attribute a default number of degrees of freedom to fitted parameters. The default value depends on the type of regression algorithm and may be overridden by specifying a number of degrees of freedom when calling the function.

1.4.0

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

* The modulo function :func:`~core.fmod` has been added. This applies the Python library function :func:`math.fmod` to the value of the uncertain-number input and transfers the components of uncertainty to the result.

* The modulo operator ``%`` has been implemented for :class:`~lib.UncertainReal`. The implementation follows the Python implementation of ``%`` for numbers. Note that the computations of :func:`math.fmod` and Python's ``%`` are not completely equivalent (see Python documentation for :func:`math.fmod`).

* The functions :func:`~GTC.formatting.create_format`, :func:`~GTC.formatting.apply_format` and
:func:`~GTC.formatting.to_string` have been added. See :ref:`formatting-uncertain-numbers`
for more details.

1.3.8

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

* A `bug <https://github.com/MSLNZ/GTC/issues/20>`_ in function :func:`reporting.sensitivity` has been corrected. The function now returns zero when the independent term (``x``) in the argument has a standard uncertainty of zero. Previously, for example, an exception would be raised if the argument ``x`` was an uncertain complex number with a real or imaginary component having zero standard uncertainty. The docstring has been updated to explain the function's behaviour in more detail.

* Some improvements to the validation of arguments in the regression functions in :mod:`type_a` and :mod:`type_b`.

1.3.7

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

* The property ``uid`` has been added to :class:`lib.UncertainReal` and :class:`lib.UncertainComplex`. For an :class:`lib.UncertainReal`, this returns the unique identifier of an elementary uncertain number and, when defined, the unique identifier associated with an intermediate uncertain number (otherwise it returns ``None``). Analogous behaviour is defined for an :class:`lib.UncertainComplex`.

* The namedtuple :obj:`named_tuples.Influence` has an attribute `uid` for the unique identifier of an uncertain-number influence. The function :func:`reporting.budget` returns a sequence of :obj:`~named_tuples.Influence` objects, each of which now has a unique identifier. This is intended to permit indexing of arbitrary information about uncertain numbers held in other data structures.

* The idiom shown for using :func:`reporting.budget` has changed in the documentation. Previously, the pair of :obj:`~named_tuples.Influence` attributes was expanded. Now, a temporary variable is assigned to each :obj:`~named_tuples.Influence` item during iteration and then the required attributes are selected.

* A new section in the documentation under `reporting` has been added to provide an example that uses the new ``uid`` feature.

* The documentation in `straight_line_functions.rst` has been updated and some details corrected.

1.3.6

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

* When loading an uncertain-number archive from a file or string, if there is an existing intermediate ``Node`` registered with the context that is indistinguishable from another in the archive, then the existing ``Node`` will be used and no error is raised. ``Node`` objects are considered indistinguishable if their labels, uncertainties and degrees of freedom are the same.

* The string format of an uncertain real number now begins with a space, if the value is positive, or a negative sign.

* The string format of an uncertain complex number now always shows the sign (+ or -) of the real component

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.