Ad

Latest version: v1.3.2

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

Scan your dependencies

1.1.1

========

- Added ``gh`` utility function for generating gradient and hessian functions
of mathematical functions. The intent is to make it easy for users wanting to
use the ``ad`` package with``scipy.optimize`` functions.

1.1

======

- Changed the core usage to be compatible with all base numeric types (int,
float, long, and complex).

- Changed the main constructor name from ``adfloat`` to ``adnumber`` because of
the full numeric support (not just for floats). The reasoning is because this
package should simply provide a "wrapper"-ish functionality for derivative
tracking (i.e., it shouldn't force the user to choose float objects if they
don't want to.

- Added ``real`` and ``imag`` properties to ``ADF`` class.

- Updated all admath functions to work with their respective numeric types using
the math and cmath module functions.

- Updated all admath function documentation to reflect basically the same as the
math module.

- Added ``pi`` and ``e`` module members to admath.

- Added ``atan2``, ``isinf`` and ``isnan`` methods to admath.

- Updated ``log10``, ``log1p``, ``expm1``, and ``fabs`` in admath to use the
actual math or cmath module functions, mostly for their higher precision at
certain input values (see the math/cmath module documentation for more
details).

- Bug fix: ``log`` didn't default to base ``e`` before. It's fixed now.

1.0.3

========

- Fixed an issue with using Numpy arrays as input to ``adfloat`` in Python 3.3.

- Renamed ``_calculate_derivatives`` method to more appropriately be called
``_apply_chain_rule``.

1.0.2

========

- Default constructor ``AD`` renamed to ``adfloat`` to follow general coding
guidelines better.

- Changed ``ADF(...)`` and ``ADV(...)`` to just ``ad(...)`` when printing out
the variables in either str or repr form (made a general printer--credits to
EOL!).

- Updated the ``_get_variables`` method to not depend on the ``d(...)`` method,
but to access the hidden member ``_lc`` directly for getting first derivative
variables.

- Renamed hidden member ``_hash`` to ``_trace``.

- Made the constructor for arrays more robust and now the tag is applied to all
objects that get created.

- Constructor is updated to return a copy of another AD object if supplied as an
input (i.e., ``x = adfloat(2); y = adfloat(x)``). This makes the two objects
equivalent, copying the nominal value and the derivatives, but naturally they
two objects are not identical (i.e., ``x==y`` returns ``True``, but ``x is y``
returns ``False``).

- Added ``sqrt`` method to ``ADF`` class because some ``numpy`` functions look
for this method of the objects it operates on (i.e., ``numpy.sqrt``,
``numpy.std``, etc.). Also updated the ``sqrt`` function in the ``admath``
module to actually use the ``math.sqrt`` method to perform the calculations.

1.0.1

========
- Fixed some vectorization bugs

1.0

math module functions.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.